pinentry

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package pinentry implements a PIN/passphrase entry dialog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PINEntry added in v0.4.0

type PINEntry struct {
	// contains filtered or unexported fields
}

PINEntry implements useful pinentry service methods.

func New added in v0.19.0

func New(binaryName string) *PINEntry

New initialises a new PINEntry.

func (*PINEntry) GetPassphrase added in v0.7.0

func (pe *PINEntry) GetPassphrase(desc, keyID string, tries int) ([]byte, error)

GetPassphrase uses pinentry to get the passphrase of the given key file.

func (*PINEntry) GetPin added in v0.19.0

func (pe *PINEntry) GetPin(k SecurityKey) func() (string, error)

GetPin uses pinentry to get the pin of the given token.

type SecurityKey

type SecurityKey interface {
	Card() string
	Retries() (int, error)
	Serial() uint32
}

A SecurityKey is a physical hardware token that requires a PIN.

Jump to

Keyboard shortcuts

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