summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2023-08-24 10:52:15 +0200
committerJustus Winter <justus@sequoia-pgp.org>2023-08-24 10:52:15 +0200
commit3563621eb8a5fd6fefce0c2d5f193e5460b82b6b (patch)
tree1974cad0e367170d76d4f811397e9c9afdd9299d
parent8cfcb74d13243f11c2eaadd707d1cabff56d0744 (diff)
openpgp: Implement Default for AEADAlgorithm.crypto-refresh-fix-hashing
-rw-r--r--openpgp/NEWS1
-rw-r--r--openpgp/src/types/mod.rs6
2 files changed, 7 insertions, 0 deletions
diff --git a/openpgp/NEWS b/openpgp/NEWS
index 69d43ab4..1ab4d852 100644
--- a/openpgp/NEWS
+++ b/openpgp/NEWS
@@ -18,6 +18,7 @@
** New functionality
- crypto::SessionKey::as_protected
- crypto::ecdh::decrypt_unwrap2
+ - impl Default for types::AEADAlgorithm
- types::AEADAlgorithm::GCM
- types::Features::{clear,set,supports}_seipdv1
- types::Features::{clear,set,supports}_seipdv2
diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs
index 1c0a5f77..19a8fbae 100644
--- a/openpgp/src/types/mod.rs
+++ b/openpgp/src/types/mod.rs
@@ -1017,6 +1017,12 @@ const AEAD_ALGORITHM_VARIANTS: [AEADAlgorithm; 3] = [
AEADAlgorithm::GCM,
];
+impl Default for AEADAlgorithm {
+ fn default() -> Self {
+ Self::const_default()
+ }
+}
+
impl AEADAlgorithm {
/// Returns whether this algorithm is supported.
///