diff --git a/openpgp-card-sequoia/src/lib.rs b/openpgp-card-sequoia/src/lib.rs index 6d825f1..049c34c 100644 --- a/openpgp-card-sequoia/src/lib.rs +++ b/openpgp-card-sequoia/src/lib.rs @@ -57,6 +57,15 @@ impl SequoiaKey { } } +/// Helper fn: get a CardUploadableKey for a ValidErasedKeyAmalgamation +pub fn vka_as_uploadable_key( + vka: ValidErasedKeyAmalgamation, + password: Option, +) -> Box { + let sqk = SequoiaKey::new(vka, password); + Box::new(sqk) +} + /// Implement the `CardUploadableKey` trait that openpgp-card uses to /// upload (sub)keys to a card. impl CardUploadableKey for SequoiaKey {