Skip to content

Commit

Permalink
Make generate_private_key() and generate_public_key() public
Browse files Browse the repository at this point in the history
We need this change for server side implementation.
Specifically at Session:new() before a key exchange is performed.

Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
  • Loading branch information
warusadura committed Feb 29, 2024
1 parent 8e9736b commit fd49a32
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,11 +39,11 @@ 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 {
pub fn generate_public_key(private_key: &Self) -> Self {
Self::new(crypto::generate_public_key(private_key))
}

Expand Down

0 comments on commit fd49a32

Please sign in to comment.