package
1.1.3
Repository: https://github.com/protonmail/go-crypto.git
Documentation: pkg.go.dev

# Functions

ArmoredDetachSign signs message with the private key from signer (which must already have been decrypted) and writes an armored signature to the Writer.
DetachSign signs message with the private key from signer (which must already have been decrypted) and writes the signature to w.
DetachSignWithParams signs message with the private key from signer (which must already have been decrypted) and writes the signature to the Writer.
DetachSignWriter signs a message with the private key from a signer (which must already have been decrypted) and writes the signature to the Writer.
Encrypt encrypts a message to a number of recipients and, optionally, signs it.
EncryptWithParams encrypts a message to a number of recipients and, optionally, signs it.
HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP hash id.
HashIdToString returns the name of the hash function corresponding to the given OpenPGP hash id.
HashToHashId returns an OpenPGP hash id which corresponds the given Hash.
NewCanonicalTextHash reformats text written to it into the canonical form and then applies the hash h.
NewCanonicalTextReader reformats text read from it into the canonical form.
NewCanonicalTextWriteCloser reformats text written to it into the canonical form.
NewEntity returns an Entity that contains fresh keys with a for signing and encrypting pgp messages.
NewEntityWithoutId returns an Entity that contains fresh keys for signing and encrypting pgp messages.
ReadArmoredKeyRing reads one or more public/private keys from an armor keyring file.
ReadEntity reads an entity (public key, identities, subkeys etc) from the given Reader.
ReadKeyRing reads one or more public/private keys.
ReadMessage parses an OpenPGP message that may be signed and/or encrypted.
Sign signs a message.
SignWithParams signs a message.
SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase.
SymmetricallyEncryptWithParams acts like SymmetricallyEncrypt but provides more configuration options.
VerifyArmoredDetachedSignature performs the same actions as VerifyDetachedSignature but expects the signature to be armored.
VerifyDetachedSignature takes a signed file and a detached signature and returns the signature packet and the entity the signature was signed by, if any, and a possible signature verification error.
VerifyDetachedSignatureReader takes a signed file and a detached signature and returns message details struct similar to the ReadMessage function.

# Constants

No description provided by the author

# Variables

PrivateKeyType is the armor type for a PGP private key.
PublicKeyType is the armor type for a PGP public key.
SignatureType is the armor type for a PGP signature.

# Structs

No description provided by the author
An Entity represents the components of an OpenPGP key: a primary public key (which must be a signing key), one or more identities claimed by that key, and zero or more subkeys, which may be encryption keys.
FileHints contains metadata about encrypted files.
Identity represents an identity claimed by an Entity and zero or more assertions by other entities about that claim.
A Key identifies a specific public key in an Entity.
MessageDetails contains the result of parsing an OpenPGP encrypted and/or signed message.
SignatureCandidate keeps state about a signature that can be potentially verified.
No description provided by the author
Subkey is an additional public key in an Entity.

# Interfaces

A KeyRing provides access to public and private keys.

# Type aliases

EntityList contains one or more Entities.
A PromptFunction is used as a callback by functions that may need to decrypt a private key, or prompt for a passphrase.