pem

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

func ReadPrivateKeyFile(file, password string) (crypto.Signer, error)

ReadPrivateKeyFile reads a PEM-encoded private key from a file. The key must be protected by a password.

func ReadPublicKeyFile

func ReadPublicKeyFile(file string) (crypto.PublicKey, error)

ReadPublicKeyFile reads a PEM-encoded public key from a file.

func UnmarshalPrivateKey

func UnmarshalPrivateKey(keyPEM, password string) (crypto.Signer, error)

UnmarshalPrivateKey reads a PEM-encoded private key from a string. The key may be protected by a password.

func UnmarshalPublicKey

func UnmarshalPublicKey(keyPEM string) (crypto.PublicKey, error)

UnmarshalPublicKey reads a PEM-encoded public key from a string.

Types

This section is empty.

Directories

Path Synopsis
Package proto registers a PEM keys.ProtoHandler using keys.RegisterHandler.
Package proto registers a PEM keys.ProtoHandler using keys.RegisterHandler.

Jump to

Keyboard shortcuts

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