Crate pretty_good

Crate pretty_good 

Source
Expand description

§pretty-good overview

pretty-good is an implementation of RFC4880 (OpenPGP Message Format), capable of reading OpenPGP packets into usable Rust structures, and creating and writing OpenPGP packets programmatically in Rust.

The primary structure of pretty-good is the Packet enum, which contains a variant for each possible type of OpenPGP packet. Each variant that has been implemented contains a single field, which is a structure representing the contents of that packet type. For example, Packet::Signature contains a SignaturePacket, which can be used to read and write OpenPGP signatures.

Packets are read by calling Packet::from_bytes, and can be serialized by calling Packet::to_bytes.

Structs§

DsaPrivateKey
DsaPublicKey
ElgamalPrivateKey
ElgamalPublicKey
Key
LiteralPacket
A Literal data packet as specified in RFC4880 §5.9.
RsaPrivateKey
RsaPublicKey
SignaturePacket
The contents of a PGP signature packet.

Enums§

AlgorithmError
Error type for PublicKeyAlgorithm and HashAlgorithm-related operations.
CompressedDataPacket
CompressionError
HashAlgorithm
Type for hash algorithms supported by OpenPGP.
KeyEncryptionMethod
KeyError
KeyMaterial
LiteralData
The contents of a LiteralPacket.
LiteralError
Error type for LiteralPacket-level errors.
Packet
An OpenPGP packet.
PacketError
Error type for Packet-level errors.
PublicKeyAlgorithm
Type for public key algorithms supported by OpenPGP.
S2kError
Signature
Actual multiprecision integer signature contents.
SignatureError
Error type for SignaturePacket-level errors.
SignatureType
The type of content a signature covers. See RFC4880 §5.2.1.
StringToKey
Subpacket
Type for SignaturePacket subpackets. See RFC4880 §5.2.3.1.
SymmetricKeyAlgorithm
Type for symmetric key algorithms supported by OpenPGP.

Functions§

s2k