update parameter from sk to private_key (#329)

This commit is contained in:
Nik Graf
2023-06-29 11:51:20 -07:00
committed by GitHub
parent 7f0b6a8e66
commit bca1abfe42
+6 -3
View File
@@ -53,9 +53,12 @@ impl<KG: KeGroup, S: SecretKey<KG>> KeyPair<KG, S> {
} }
/// Obtains a KeyPair from a private key /// Obtains a KeyPair from a private key
pub fn from_private_key(sk: S) -> Result<Self, ProtocolError<S::Error>> { pub fn from_private_key(private_key: S) -> Result<Self, ProtocolError<S::Error>> {
let pk = sk.public_key()?; let pk = private_key.public_key()?;
Ok(Self { pk, sk }) Ok(Self {
pk,
sk: private_key,
})
} }
} }