From 25f8c122e18a507985c213b807d10047607fc02a Mon Sep 17 00:00:00 2001 From: Fabian Kaczmarczyck Date: Thu, 10 Aug 2023 14:08:35 +0200 Subject: [PATCH] wider public interface to allow custom PrivateKey construction --- libraries/opensk/src/api/private_key.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/opensk/src/api/private_key.rs b/libraries/opensk/src/api/private_key.rs index 1125b31e..39745e88 100644 --- a/libraries/opensk/src/api/private_key.rs +++ b/libraries/opensk/src/api/private_key.rs @@ -69,7 +69,7 @@ impl PrivateKey { } /// Helper function that creates a private key of type ECDSA. - fn new_ecdsa_from_bytes(bytes: &[u8]) -> Option { + pub fn new_ecdsa_from_bytes(bytes: &[u8]) -> Option { if bytes.len() != 32 { return None; } @@ -80,7 +80,7 @@ impl PrivateKey { /// Helper function that creates a private key of type Ed25519. #[cfg(feature = "ed25519")] - fn new_ed25519_from_bytes(bytes: &[u8]) -> Option { + pub fn new_ed25519_from_bytes(bytes: &[u8]) -> Option { if bytes.len() != 32 { return None; }