5 unstable releases

Uses old Rust 2015

0.2.2 Apr 16, 2018
0.2.1 Apr 10, 2018
0.2.0 Apr 9, 2018
0.1.0 Mar 8, 2018
0.0.0 Feb 23, 2018

#33 in #gpg

Apache-2.0

77KB
2K SLoC

pretty-good

pretty-good is a Rust library for reading, manipulating, and creating OpenPGP packets.

Usage

For an example of using pretty-good with the YubiHSM2, see yubihsm-pgp-sign.


lib.rs:

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.

Dependencies

~5.5MB
~105K SLoC