From 13e8bc81f2da8a196f87568aedf82556f72fb946 Mon Sep 17 00:00:00 2001 From: Divam Date: Thu, 22 Feb 2024 11:07:47 +0900 Subject: [PATCH] Allow cloning ECPublicKey and make its fields pub --- ledger_device_sdk/src/ecc.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ledger_device_sdk/src/ecc.rs b/ledger_device_sdk/src/ecc.rs index b22575c0..e2870179 100644 --- a/ledger_device_sdk/src/ecc.rs +++ b/ledger_device_sdk/src/ecc.rs @@ -121,9 +121,10 @@ pub struct ECPrivateKey { /// let public_key = sk.public_key(); /// ``` #[repr(C)] +#[derive(Clone)] pub struct ECPublicKey { - curve: CurvesId, - keylength: usize, + pub curve: CurvesId, + pub keylength: usize, pub pubkey: [u8; S], }