Documentation
¶
Index ¶
- func Decrypt(cipherArmored []byte, keys openpgp.EntityList) ([]byte, error)
- func Encrypt(msg []byte, pubkeys openpgp.EntityList) ([]byte, error)
- func ReadArmoredKey(data io.Reader) (openpgp.EntityList, error)
- func ReadArmoredKeyFile(path string) (openpgp.EntityList, error)
- func ReadPrivateKey(data io.Reader, password []byte) (openpgp.EntityList, error)
- func ReadPrivateKeyFile(path string, password []byte) (openpgp.EntityList, error)
- func Sign(data []byte, privateKeys openpgp.EntityList) ([]byte, error)
- func VerifySignature(signedData []byte, publicKeys openpgp.EntityList, expectedFingerprint [20]byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadArmoredKey ¶
func ReadArmoredKey(data io.Reader) (openpgp.EntityList, error)
ReadArmoredKey attempts to read the filepath and parses an armored GPG key
func ReadArmoredKeyFile ¶
func ReadArmoredKeyFile(path string) (openpgp.EntityList, error)
ReadArmoredKeyFile attempts to read the filepath and parses an armored GPG key
func ReadPrivateKey ¶
ReadPrivateKey attempts to read the filepath and parses an armored GPG private key
func ReadPrivateKeyFile ¶
func ReadPrivateKeyFile(path string, password []byte) (openpgp.EntityList, error)
ReadPrivateKeyFile attempts to read the filepath and parses an armored GPG private key
func Sign ¶ added in v0.8.0
func Sign(data []byte, privateKeys openpgp.EntityList) ([]byte, error)
Sign signs the provided data using the private key(s) in the entity list. It returns the signed, armored data.
func VerifySignature ¶ added in v0.8.0
func VerifySignature(signedData []byte, publicKeys openpgp.EntityList, expectedFingerprint [20]byte) ([]byte, error)
VerifySignature verifies the signature on the provided data using the public key(s). It returns the original cleartext data if the verification is successful, or an error if it fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.