summaryrefslogtreecommitdiffstats
path: root/openpgp/src
diff options
context:
space:
mode:
authorIgor Matuszewski <igor@sequoia-pgp.org>2020-04-09 23:20:05 +0200
committerIgor Matuszewski <igor@sequoia-pgp.org>2020-06-22 11:57:06 +0200
commit35a57dbb7f5e94b8b2f6d70643b6718a81cfc21e (patch)
tree0b326cc71abe6c6f9eb03d63f78ad59627ac329a /openpgp/src
parent05ad615487c4735b16b049adde2ecbb1e3418df6 (diff)
openpgp: Introduce crypto::backend facade module
Diffstat (limited to 'openpgp/src')
-rw-r--r--openpgp/src/crypto/backend.rs7
-rw-r--r--openpgp/src/crypto/backend/nettle.rs1
-rw-r--r--openpgp/src/crypto/mod.rs1
3 files changed, 9 insertions, 0 deletions
diff --git a/openpgp/src/crypto/backend.rs b/openpgp/src/crypto/backend.rs
new file mode 100644
index 00000000..2a57889f
--- /dev/null
+++ b/openpgp/src/crypto/backend.rs
@@ -0,0 +1,7 @@
+//! Concrete implementation of the crypto primitives used by the rest of the
+//! crypto API.
+
+#[cfg(feature = "crypto-nettle")]
+mod nettle;
+#[cfg(feature = "crypto-nettle")]
+pub use self::nettle::*;
diff --git a/openpgp/src/crypto/backend/nettle.rs b/openpgp/src/crypto/backend/nettle.rs
new file mode 100644
index 00000000..451774e2
--- /dev/null
+++ b/openpgp/src/crypto/backend/nettle.rs
@@ -0,0 +1 @@
+//! Implementation of Sequoia crypto API using the Nettle cryptographic library.
diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs
index 8df483e0..8d2e04fd 100644
--- a/openpgp/src/crypto/mod.rs
+++ b/openpgp/src/crypto/mod.rs
@@ -13,6 +13,7 @@ use crate::Result;
pub(crate) mod aead;
mod asymmetric;
pub use self::asymmetric::{Signer, Decryptor, KeyPair};
+mod backend;
pub(crate) mod ecdh;
pub mod hash;
mod keygrip;