piv

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Service

func Service(card Card, prompt Prompter) (envelope.Service, error)

Service returns an PIV based envelope encryption service instance.

Types

type Card

type Card interface {
	Close() error
	Public() *ecdsa.PublicKey
	SharedKey(peer *ecdsa.PublicKey, prompt Prompter) ([]byte, error)
}

Card is a PIV card abstraction.

type Opener

type Opener interface {
	Open(serial uint32, slot uint8) (Card, error)
}

Opener describes PIV manager card opener contract.

func Manager

func Manager() Opener

Manager returns a PIV manager instance to retrieve Card info.

type Prompter

type Prompter func(msg string) (string, error)

Prompter is used to describe PIN prompt contract.

Jump to

Keyboard shortcuts

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