gopass – github.com/howeyc/gopass Index | Files

package gopass

import "github.com/howeyc/gopass"

Index

Variables

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
}

Source Files

pass.go terminal.go

Version
v0.0.0-20210920133722-c8aef6fb66ef (latest)
Published
Sep 20, 2021
Platform
windows/amd64
Imports
5 packages
Last checked
1 month ago

Tools for package owners.