From 703ab4d728097d886cdf288feb5a0336b823290d Mon Sep 17 00:00:00 2001 From: Dhanuka Warusadura Date: Thu, 29 Feb 2024 15:32:06 +0530 Subject: [PATCH] Make generate_private_key() and generate_aes_key public We need this change for server side implementation. Signed-off-by: Dhanuka Warusadura --- client/src/key.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/key.rs b/client/src/key.rs index 38cf142c5..ea6de021a 100644 --- a/client/src/key.rs +++ b/client/src/key.rs @@ -39,7 +39,7 @@ impl Key { Self { key, strength } } - pub(crate) fn generate_private_key() -> Self { + pub fn generate_private_key() -> Self { Self::new(crypto::generate_private_key().to_vec()) } @@ -47,7 +47,7 @@ impl Key { Self::new(crypto::generate_public_key(private_key)) } - pub(crate) fn generate_aes_key(private_key: &Self, server_public_key: &Self) -> Self { + pub fn generate_aes_key(private_key: &Self, server_public_key: &Self) -> Self { Self::new(crypto::generate_aes_key(private_key, server_public_key).to_vec()) } }