Skip to content

Commit

Permalink
update parameter from sk to private_key
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Jun 15, 2023
1 parent c3498ea commit 12ad2ef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/keypair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ impl<KG: KeGroup, S: SecretKey<KG>> KeyPair<KG, S> {
}

/// Obtains a KeyPair from a private key
pub fn from_private_key(sk: S) -> Result<Self, ProtocolError<S::Error>> {
let pk = sk.public_key()?;
Ok(Self { pk, sk })
pub fn from_private_key(private_key: S) -> Result<Self, ProtocolError<S::Error>> {
let pk = private_key.public_key()?;
Ok(Self {
pk,
sk: private_key,
})
}
}

Expand Down

0 comments on commit 12ad2ef

Please sign in to comment.