Skip to main content

import_secret_key_pkcs8

Function import_secret_key_pkcs8 

Source
pub async fn import_secret_key_pkcs8(
    pkcs8: Vec<u8>,
    options: AgreementKeyOptions,
) -> Result<SecretKey, Error>
Expand description

Import a static secret key as a PKCS#8 PrivateKeyInfo (DER, RFC 8410: the 32-byte scalar in a CurvePrivateKey). The scalar is clamped at use per RFC 7748, like the JWK import’s d.