Documentation ¶
Index ¶
- func FromProto(pb *keyspb.PEMKeyFile) (crypto.Signer, error)
- func ReadPrivateKeyFile(file, password string) (crypto.Signer, error)
- func ReadPublicKeyFile(file string) (crypto.PublicKey, error)
- func UnmarshalPrivateKey(keyPEM, password string) (crypto.Signer, error)
- func UnmarshalPublicKey(keyPEM string) (crypto.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromProto ¶
func FromProto(pb *keyspb.PEMKeyFile) (crypto.Signer, error)
FromProto takes a PEMKeyFile protobuf message and loads the private key it specifies.
func ReadPrivateKeyFile ¶
ReadPrivateKeyFile reads a PEM-encoded private key from a file. The key must be protected by a password.
func ReadPublicKeyFile ¶
ReadPublicKeyFile reads a PEM-encoded public key from a file.
func UnmarshalPrivateKey ¶
UnmarshalPrivateKey reads a PEM-encoded private key from a string. The key may be protected by a password.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.