diff --git a/src/lib.rs b/src/lib.rs index 02b80c5..334a23c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -87,7 +87,8 @@ const PUBLIC_KEY_PREFIXES: [u8; 8] = [ type Result = std::result::Result; /// The main interface used for reading and writing _nkey-encoded_ key pairs, including -/// seeds and public keys. Instances of this type cannot be cloned. +/// seeds and public keys. +#[derive(Clone)] pub struct KeyPair { kp_type: KeyPairType, sk: Option, //rawkey_kind: RawKeyKind, diff --git a/src/xkeys.rs b/src/xkeys.rs index 8c9b370..d6dd6eb 100644 --- a/src/xkeys.rs +++ b/src/xkeys.rs @@ -17,7 +17,8 @@ use crypto_box::{PublicKey, SecretKey}; use rand::{CryptoRng, Rng, RngCore}; /// The main interface used for reading and writing _nkey-encoded_ curve key -/// pairs. Instances of this type cannot be cloned. +/// pairs. +#[derive(Clone)] pub struct XKey { public: PublicKey, secret: Option,