package pem
import "github.com/google/trillian/crypto/keys/pem"
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)
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.
func UnmarshalPublicKey ¶
UnmarshalPublicKey reads a PEM-encoded public key from a string.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
crypto/keys/pem/proto | Package proto registers a PEM keys.ProtoHandler using keys.RegisterHandler. |
- Version
- v1.3.7
- Published
- Jan 16, 2020
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 4 hours ago –
Tools for package owners.