keyring

package
v0.0.0-...-c8afd98 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKeyType            = errors.New("invalid key type")
	ErrSignatureValidationFailed = errors.New("signature validation failed")
)

Functions

This section is empty.

Types

type Keyring

type Keyring interface {
	Try(...UseKeyFn) bool
	ForEach(func(key interface{}))
	Marshal() ([]byte, error)
}

func New

func New(keys ...interface{}) Keyring

func Unmarshal

func Unmarshal(data []byte) (Keyring, error)

type PKPKey

type PKPKey struct {
	PinnedKeys []*pkp.PublicKeyPin `json:"pinnedKeys"`
}

func NewPKPKey

func NewPKPKey(pinnedKeys []*pkp.PublicKeyPin) *PKPKey

type SharedKeys

type SharedKeys struct {
	ClientKey ed25519.PrivateKey `json:"clientKey"`
	ServerKey ed25519.PrivateKey `json:"serverKey"`
}

func NewSharedKeys

func NewSharedKeys(secret []byte) *SharedKeys

type UseKeyFn

type UseKeyFn interface{} // func(*KeyringType)

Jump to

Keyboard shortcuts

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