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 ¶
View Source
var ( // Unescape enables unescaping of percent encoded values, // disabled by default for backward compatibility. See #1621 Unescape bool )
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))
Click to show internal directories.
Click to hide internal directories.