Categorygithub.com/kthomas/go-pgputil
modulepackage
0.0.0-20200602073402-784e96083943
Repository: https://github.com/kthomas/go-pgputil.git
Documentation: pkg.go.dev

# Functions

DecodeArmoredPrivateKey decodes an armored PGP private key.
DecodeArmoredPublicKey decodes an armored PGP public key.
DecodeRSAPrivateKeyFromPEM parses a PEM-encoded PKCS1 or PKCS8 private key.
DecodeRSAPrivateKeyFromPEMWithPassword parses a PEM-encoded PKCS1 or PKCS8 private key protected with password.
DecodeRSAPublicKeyFromPEM parses a PEM-encoded PKCS1 or PKCS8 public key.
EncodePrivateKeyToPEM encodes the given private key from RSA to PEM format.
PGPPubDecrypt decrypts data.
PGPPubEncrypt encrypts the given data using the environment-configured public key.
PGPPubSymmetricallyEncrypt encrypts the given data using the environment-configured public key.
RequirePGP reads `PGP_PUBLIC_KEY`, `PGP_PRIVATE_KEY` and optional `PGP_PASSPHRASE` from the environment and panics if the config is invalid.

# Variables

ErrKeyMustBePEMEncoded is an error indicating the given key was not a PEM-encoded PKCS1 or PKCS8 private key.
ErrNotRSAPrivateKey is an error indicating the given key was not a valid RSA private key.
ErrNotRSAPublicKey is an error indicating the given key was not a valid RSA public key.