package
2.0.0+incompatible
Repository: https://github.com/dimensiondev/crypto.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package armor implements OpenPGP ASCII Armor, see RFC 4880.
Package clearsign generates and processes OpenPGP, clear-signed data.
Package ecdh implements ECDH encryption, suitable for OpenPGP, as specified in RFC 6637, section 8.
Package elgamal implements ElGamal encryption, suitable for OpenPGP, as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms," IEEE Transactions on Information Theory, v.
Package errors contains common error types for the OpenPGP packages.
Package packet implements parsing and serialization of OpenPGP packets, as specified in RFC 4880.
Package s2k implements the various OpenPGP string-to-key transforms as specified in RFC 4800 section 3.7.1.

# Functions

ArmoredDetachSign signs message with the private key from signer (which must already have been decrypted) and writes an armored signature to w.
ArmoredDetachSignText signs message (after canonicalising the line endings) with the private key from signer (which must already have been decrypted) and writes an armored signature to w.
CheckArmoredDetachedSignature performs the same actions as CheckDetachedSignature but expects the signature to be armored.
CheckDetachedSignature takes a signed file and a detached signature and returns the signer if the signature is valid.
DetachSign signs message with the private key from signer (which must already have been decrypted) and writes the signature to w.
DetachSignText signs message (after canonicalising the line endings) with the private key from signer (which must already have been decrypted) and writes the signature to w.
Encrypt encrypts a message to a number of recipients and, optionally, signs it.
Encrypt encrypts a message to a number of recipients and, optionally, signs it.
NewCanonicalTextHash reformats text written to it into the canonical form and then applies the hash h.
NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a single identity composed of the given full name, comment and email, any of which may be empty but must not contain any of "()<>\x00".
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.
SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase.

# 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

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.
An 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.
A Subkey is an additional public key in an Entity.

# Interfaces

A KeyRing provides access to public and private keys.

# Type aliases

An 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.