summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-05-07 11:52:56 +0200
committerNeal H. Walfield <neal@pep.foundation>2019-05-07 12:18:43 +0200
commit576b4d68aa046ccac9ff0b9c275c7a0413cc417a (patch)
tree8af9e93409018b45484d28a5d39a0e5a90916aae
parent381ecfedce31d38d6bd447d85a05f7d9a458c38b (diff)
openpgp: Add a Default implementation for CipherSuite
-rw-r--r--openpgp/src/tpk/builder.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/openpgp/src/tpk/builder.rs b/openpgp/src/tpk/builder.rs
index 6b866f57..11d4790c 100644
--- a/openpgp/src/tpk/builder.rs
+++ b/openpgp/src/tpk/builder.rs
@@ -33,6 +33,12 @@ pub enum CipherSuite {
P521,
}
+impl Default for CipherSuite {
+ fn default() -> Self {
+ CipherSuite::RSA3k
+ }
+}
+
impl CipherSuite {
fn generate_key(self, flags: &KeyFlags) -> Result<Key> {
use constants::Curve;