Change function name to be similar to RSA one

This commit is contained in:
Rohit Aggarwal 2018-03-13 08:57:35 +00:00
parent e655b561a7
commit e3a657d22b
1 changed files with 3 additions and 3 deletions

View File

@ -730,7 +730,7 @@ impl EcKey<Private> {
} }
/// Constructs an public/private key pair given a curve, a private key and a public key point. /// Constructs an public/private key pair given a curve, a private key and a public key point.
pub fn from_keys( pub fn from_private_components(
group: &EcGroupRef, group: &EcGroupRef,
private_number: &BigNumRef, private_number: &BigNumRef,
public_key: &EcPointRef, public_key: &EcPointRef,
@ -873,11 +873,11 @@ mod test {
} }
#[test] #[test]
fn key_from_keys() { fn key_from_private_components() {
let group = EcGroup::from_curve_name(Nid::X9_62_PRIME256V1).unwrap(); let group = EcGroup::from_curve_name(Nid::X9_62_PRIME256V1).unwrap();
let key = EcKey::generate(&group).unwrap(); let key = EcKey::generate(&group).unwrap();
let dup_key = EcKey::from_keys(&group, key.private_key(), key.public_key()).unwrap(); let dup_key = EcKey::from_private_components(&group, key.private_key(), key.public_key()).unwrap();
let res = dup_key.check_key().unwrap(); let res = dup_key.check_key().unwrap();
assert!(res == ()); assert!(res == ());