Skip to main content

pgp/
lib.rs

1#![doc = include_str!("../README.md")]
2
3//! # Further reading
4//!
5//! More usage examples are available under the respective modules:
6//!
7//! - [`composed`]: Operations on OpenPGP composite objects, such as
8//! [Transferable Public Key]s (Certificates) or [Message]s.
9//! This module covers most common OpenPGP operations, including producing and consuming messages,
10//! key generation, and dealing with detached signatures.
11//!
12//! - [`packet`]: Lower-level packet based operations.
13//!
14//! - [`armor`]: Lower-level access to [ASCII Armor] functionality is exposed in the [`armor`]
15//! module.
16//! (However, users of rPGP will usually handle armor implicitly in the [`composed`] module)
17//!
18//! [Transferable Public Key]: https://www.rfc-editor.org/rfc/rfc9580#name-transferable-public-keys
19//! [Message]: https://www.rfc-editor.org/rfc/rfc9580#name-openpgp-messages
20//! [ASCII Armor]: https://www.rfc-editor.org/rfc/rfc9580#name-forming-ascii-armor
21
22#![cfg_attr(not(test), deny(clippy::unwrap_used))]
23#![allow(clippy::missing_const_for_fn, clippy::type_complexity)]
24#![deny(unsafe_code)]
25
26#[cfg(test)]
27#[macro_use]
28extern crate pretty_assertions;
29
30// Reexport as used in the public api
31pub use bytes;
32
33pub(crate) mod util;
34
35pub mod adapter;
36pub mod armor;
37pub mod base64;
38pub mod composed;
39pub mod crypto;
40pub mod errors;
41pub mod line_writer;
42pub mod normalize_lines;
43pub mod packet;
44pub mod ser;
45pub mod types;
46
47mod parsing;
48mod parsing_reader;
49
50/// The version of this crate.
51pub const VERSION: &str = env!("CARGO_PKG_VERSION");
52
53/// Default maximum size that gets buffered.
54pub const MAX_BUFFER_SIZE: usize = 1024 * 1024 * 1024;