Skip to content

Commit

Permalink
wider public interface to allow custom PrivateKey construction
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczmarczyck committed Aug 10, 2023
1 parent 6e8be2f commit 25f8c12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/opensk/src/api/private_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl PrivateKey {
}

/// Helper function that creates a private key of type ECDSA.
fn new_ecdsa_from_bytes(bytes: &[u8]) -> Option<Self> {
pub fn new_ecdsa_from_bytes(bytes: &[u8]) -> Option<Self> {
if bytes.len() != 32 {
return None;
}
Expand All @@ -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<Self> {
pub fn new_ed25519_from_bytes(bytes: &[u8]) -> Option<Self> {
if bytes.len() != 32 {
return None;
}
Expand Down

0 comments on commit 25f8c12

Please sign in to comment.