der

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 84

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromProto

func FromProto(_ context.Context, pb proto.Message) (crypto.Signer, error)

FromProto builds a crypto.Signer from a proto.Message, which must be of type PrivateKey.

func MarshalPrivateKey

func MarshalPrivateKey(key crypto.Signer) ([]byte, error)

MarshalPrivateKey serializes an RSA or ECDSA private key as DER.

func MarshalPublicKey

func MarshalPublicKey(pubKey crypto.PublicKey) ([]byte, error)

MarshalPublicKey serializes an RSA or ECDSA public key as DER.

func UnmarshalPrivateKey

func UnmarshalPrivateKey(keyDER []byte) (crypto.Signer, error)

UnmarshalPrivateKey reads a DER-encoded private key.

func UnmarshalPublicKey

func UnmarshalPublicKey(keyDER []byte) (crypto.PublicKey, error)

UnmarshalPublicKey reads a DER-encoded public key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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