Documentation ¶
Overview ¶
Package pinentry implements a cross platform pinentry client. It can be used to obtain credentials from the user through a simple UI application.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a pinentry client
Example ¶
pi, err := New() if err != nil { panic(err) } _ = pi.Set("title", "Agent Pinentry") _ = pi.Set("desc", "Asking for a passphrase") _ = pi.Set("prompt", "Please enter your passphrase:") _ = pi.Set("ok", "OK") pin, err := pi.GetPin() if err != nil { panic(err) } fmt.Println(string(pin))
Output:
Click to show internal directories.
Click to hide internal directories.