summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/backend/rust.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/crypto/backend/rust.rs')
-rw-r--r--openpgp/src/crypto/backend/rust.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/openpgp/src/crypto/backend/rust.rs b/openpgp/src/crypto/backend/rust.rs
index dc4773ed..61784b2c 100644
--- a/openpgp/src/crypto/backend/rust.rs
+++ b/openpgp/src/crypto/backend/rust.rs
@@ -55,6 +55,15 @@ impl Curve {
}
impl AEADAlgorithm {
+ /// Returns the best AEAD mode supported by the backend.
+ ///
+ /// This SHOULD return OCB, which is the mandatory-to-implement
+ /// algorithm and the most performing one, but fall back to any
+ /// supported algorithm.
+ pub(crate) const fn const_default() -> AEADAlgorithm {
+ AEADAlgorithm::EAX
+ }
+
pub(crate) fn is_supported_by_backend(&self) -> bool {
use self::AEADAlgorithm::*;
match &self {