pgp/
lib.rs

1#![cfg_attr(docs_rs, feature(doc_cfg, doc_auto_cfg))]
2#![doc = include_str!("../README.md")]
3
4pub mod decrypt;
5pub mod encrypt;
6mod error;
7#[cfg(feature = "key-discovery")]
8pub mod http;
9pub mod sign;
10pub mod utils;
11pub mod verify;
12
13pub use pgp_native as native;
14
15#[doc(inline)]
16pub use crate::{
17    decrypt::decrypt,
18    encrypt::encrypt,
19    error::{Error, Result},
20    sign::sign,
21    utils::{
22        gen_key_pair, read_pkey_from_path, read_sig_from_bytes, read_skey_from_file,
23        read_skey_from_string,
24    },
25    verify::verify,
26};
27
28#[cfg(feature = "key-discovery")]
29#[cfg(any(
30    all(feature = "tokio", feature = "async-std"),
31    not(any(feature = "tokio", feature = "async-std"))
32))]
33compile_error!("Either feature `tokio` or `async-std` must be enabled for this crate.");
34
35#[cfg(feature = "key-discovery")]
36#[cfg(any(
37    all(feature = "rustls", feature = "native-tls"),
38    not(any(feature = "rustls", feature = "native-tls"))
39))]
40compile_error!("Either feature `rustls` or `native-tls` must be enabled for this crate.");