kprovider

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyMustBePEMEncoded = errors.New("invalid key: key must be PEM encoded PKCS1 or PKCS8 private key")
	ErrNotRSAPublicKey     = errors.New("key is not a valid RSA public key")
)

Functions

func ParseRSAPublicKeyFromPEM added in v0.0.2

func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error)

Types

type KeyProvider

type KeyProvider interface {
	LoadPublicKey(uid string, keyPair string) (*rsa.PublicKey, error)
}

func NewLocalFileSystemKProvider

func NewLocalFileSystemKProvider(path string) KeyProvider

type LocalFileSystemKProvider

type LocalFileSystemKProvider struct {
	FileSystem afero.Fs
	Path       string
}

func (LocalFileSystemKProvider) LoadPublicKey

func (w LocalFileSystemKProvider) LoadPublicKey(uid string, keyPair string) (*rsa.PublicKey, error)

Jump to

Keyboard shortcuts

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