password

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2015 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

password is a package for reading a password securely from a terminal. The code in this package disables echo in the terminal so that the password is not echoed back in plaintext to the user.

Index

Constants

View Source
const ENABLE_ECHO_INPUT = 0x0004

Magic constant from MSDN to control whether charactesr read are repeated back on the console.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx

Variables

View Source
var ErrInterrupted = errors.New("interrupted")

Functions

func Read

func Read(f *os.File) (string, error)

Read reads the password from the given os.File. The password will not be echoed back to the user. Ctrl-C will automatically return from this function with a blank string and an ErrInterrupted.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL