gopass

package module
Version: v0.0.0-...-7cb4b85 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: ISC Imports: 5 Imported by: 780

README

getpasswd in Go GoDoc Build Status

You should probably just use terminal.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInterrupted       = errors.New("interrupted")
	ErrMaxLengthExceeded = fmt.Errorf("maximum byte limit (%v) exceeded", maxLength)
)

Functions

func GetPasswd

func GetPasswd() ([]byte, error)

GetPasswd returns the password read from the terminal without echoing input. The returned byte array does not include end-of-line characters.

func GetPasswdMasked

func GetPasswdMasked() ([]byte, error)

GetPasswdMasked returns the password read from the terminal, echoing asterisks. The returned byte array does not include end-of-line characters.

func GetPasswdPrompt

func GetPasswdPrompt(prompt string, mask bool, r FdReader, w io.Writer) ([]byte, error)

GetPasswdPrompt prompts the user and returns the password read from the terminal. If mask is true, then asterisks are echoed. The returned byte array does not include end-of-line characters.

Types

type FdReader

type FdReader interface {
	io.Reader
	Fd() uintptr
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto