pinentry

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBinary

func GetBinary() string

GetBinary returns the binary name

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:

func New

func New() (*Client, error)

New creates a new pinentry client

func (*Client) Close

func (c *Client) Close()

Close closes the client

func (*Client) Confirm

func (c *Client) Confirm() bool

Confirm sends the confirm message

func (*Client) GetPin

func (c *Client) GetPin() ([]byte, error)

GetPin asks for the pin

func (*Client) Set

func (c *Client) Set(key, value string) error

Set sets a key

Jump to

Keyboard shortcuts

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