Home
last modified time | relevance | path

Searched refs:ECDHPrivateKey (Results 1 – 2 of 2) sorted by relevance

/system/security/keystore2/src/
Dec_crypto.rs27 pub struct ECDHPrivateKey(ECKey); struct
29 impl ECDHPrivateKey { impl
31 pub fn generate() -> Result<ECDHPrivateKey> { in generate()
32 ec_key_generate_key().map(ECDHPrivateKey).context(ks_err!("generation failed")) in generate()
36 pub fn from_private_key(buf: &[u8]) -> Result<ECDHPrivateKey> { in from_private_key() argument
37 ec_key_parse_private_key(buf).map(ECDHPrivateKey).context(ks_err!("parsing failed")) in from_private_key()
116 let recipient = ECDHPrivateKey::generate()?; in test_crypto_roundtrip()
118 ECDHPrivateKey::encrypt_message(&recipient.public_key()?, message)?; in test_crypto_roundtrip()
119 let recipient = ECDHPrivateKey::from_private_key(&recipient.private_key()?)?; in test_crypto_roundtrip()
Dsuper_key.rs23 ec_crypto::ECDHPrivateKey,
457 ECDHPrivateKey::from_private_key(&key.key) in unwrap_key_with_key()
650 ECDHPrivateKey::encrypt_message(public_key, key_blob) in encrypt_with_hybrid_super_key()
758 ECDHPrivateKey::generate().context(ks_err!("Failed to generate ECDH key"))?; in create_super_key()