gpgx

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(cipherArmored []byte, keys openpgp.EntityList) ([]byte, error)

func Encrypt

func Encrypt(msg []byte, pubkeys openpgp.EntityList) ([]byte, error)

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

func ReadPrivateKey(data io.Reader, password []byte) (openpgp.EntityList, error)

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.

Jump to

Keyboard shortcuts

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