Lines Matching refs:key_pair
96 let key_pair = signature::RsaKeyPair::from_der(&private_key); in test_signature_rsa_pkcs1_sign() localVariable
98 assert!(key_pair.is_err()); in test_signature_rsa_pkcs1_sign()
101 let key_pair = key_pair.unwrap(); in test_signature_rsa_pkcs1_sign() localVariable
105 let mut actual = vec![0u8; key_pair.public_modulus_len()]; in test_signature_rsa_pkcs1_sign()
106 key_pair in test_signature_rsa_pkcs1_sign()
134 let key_pair = signature::RsaKeyPair::from_der(&private_key); in test_signature_rsa_pss_sign() localVariable
135 if key_pair.is_err() && result == "Fail-Invalid-Key" { in test_signature_rsa_pss_sign()
138 let key_pair = key_pair.unwrap(); in test_signature_rsa_pss_sign() localVariable
145 let mut actual = vec![0u8; key_pair.public_modulus_len()]; in test_signature_rsa_pss_sign()
146 key_pair.sign(alg, &rng, &msg, actual.as_mut_slice())?; in test_signature_rsa_pss_sign()
314 let key_pair = signature::RsaKeyPair::from_pkcs8(PRIVATE_KEY).unwrap(); in rsa_test_public_key_coverage() localVariable
317 assert_eq!(key_pair.public_key().as_ref(), PUBLIC_KEY); in rsa_test_public_key_coverage()
320 let _ = key_pair.public_key().clone(); in rsa_test_public_key_coverage()
325 key_pair in rsa_test_public_key_coverage()
332 assert_eq!(PUBLIC_KEY_DEBUG, format!("{:?}", key_pair.public_key())); in rsa_test_public_key_coverage()
334 format!("RsaKeyPair {{ public_key: {:?} }}", key_pair.public_key()), in rsa_test_public_key_coverage()
335 format!("{:?}", key_pair) in rsa_test_public_key_coverage()