Skip to content

Commit

Permalink
Make generate_private_key() and generate_aes_key public
Browse files Browse the repository at this point in the history
We need this change for server side implementation.

Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
  • Loading branch information
warusadura committed Mar 1, 2024
1 parent 8e9736b commit 703ab4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ 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())
}

pub(crate) fn generate_public_key(private_key: &Self) -> Self {
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())
}
}
Expand Down

0 comments on commit 703ab4d

Please sign in to comment.