cryptoutils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingOrBadBlock is thrown when the PEM cannot be correctly decoded
	ErrMissingOrBadBlock = errors.New("failed to parse PEM block containing the key")
	// ErrKeyUnknown is thrown when the key type is not ed25519
	ErrKeyUnknown = errors.New("unexpected or unknown type of key")
)

Functions

func MarshalED25519PublicKey

func MarshalED25519PublicKey(log logr.Logger, pk *ed25519.PublicKey) (string, error)

MarshalED25519PublicKey converts a crypto.ed25519 PublicKey into a string

func ParseED25519PrivateKey

func ParseED25519PrivateKey(log logr.Logger, raw []byte) (*ed25519.PrivateKey, error)

ParseED25519PrivateKey attempts to parse a crypto.ed25519 PrivateKey from a given byte slice

func ParseED25519PublicKey

func ParseED25519PublicKey(log logr.Logger, raw []byte) (*ed25519.PublicKey, error)

ParseED25519PublicKey attempts to parse a crypto.ed25519 PublicKey from a given byte slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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