passphrase

package
v0.0.0-...-77bced0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package passphrase is a utility function for managing passphrase for TUF and Notary keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Retriever

type Retriever func(keyName, alias string, createNew bool, attempts int) (passphrase string, giveup bool, err error)

Retriever is a callback function that should retrieve a passphrase for a given named key. If it should be treated as new passphrase (e.g. with confirmation), createNew will be true. Attempts is passed in so that implementers decide how many chances to give to a human, for example.

func PromptRetriever

func PromptRetriever() Retriever

PromptRetriever returns a new Retriever which will provide a prompt on stdin and stdout to retrieve a passphrase. The passphrase will be cached such that subsequent prompts will produce the same passphrase.

func PromptRetrieverWithInOut

func PromptRetrieverWithInOut(in io.Reader, out io.Writer) Retriever

PromptRetrieverWithInOut returns a new Retriever which will provide a prompt using the given in and out readers. The passphrase will be cached such that subsequent prompts will produce the same passphrase.

Jump to

Keyboard shortcuts

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