Help us shape the future of Go! Take the 2026 Go Developer Survey

pem

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: Apache-2.0 Imports: 8 Imported by: 83

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