Documentation ¶
Overview ¶
Package der contains functions for marshaling and unmarshaling keys in DER format.
Index ¶
- func FromProto(_ context.Context, pb proto.Message) (crypto.Signer, error)
- func MarshalPrivateKey(key crypto.Signer) ([]byte, error)
- func MarshalPublicKey(pubKey crypto.PublicKey) ([]byte, error)
- func UnmarshalPrivateKey(keyDER []byte) (crypto.Signer, error)
- func UnmarshalPublicKey(keyDER []byte) (crypto.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromProto ¶
FromProto builds a crypto.Signer from a proto.Message, which must be of type PrivateKey.
func MarshalPrivateKey ¶
MarshalPrivateKey serializes an RSA or ECDSA private key as DER.
func MarshalPublicKey ¶
MarshalPublicKey serializes an RSA or ECDSA public key as DER.
func UnmarshalPrivateKey ¶
UnmarshalPrivateKey reads a DER-encoded private key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.