readpassword

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package readpassword reads a password from the terminal of from stdin.

Index

Constants

View Source
const (
	// TrezorPayloadLen is the length of the payload data passed to Trezor's
	// CipherKeyValue function.
	TrezorPayloadLen = 32
	// TrezorSupport is true when gocryptfs has been compile with -tags enable_trezor
	TrezorSupport = false
)

Variables

This section is empty.

Functions

func Once

func Once(extpass []string, passfile string, prompt string) []byte

Once tries to get a password from the user, either from the terminal, extpass or stdin. Leave "prompt" empty to use the default "Password: " prompt.

func Trezor added in v1.6.1

func Trezor(payload []byte) []byte

Trezor determinitically derives 32 bytes from the payload and the connected USB security module.

func Twice

func Twice(extpass []string, passfile string) []byte

Twice is the same as Once but will prompt twice if we get the password from the terminal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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