Skip to main content

export_private_key

Function export_private_key 

Source
pub fn export_private_key(
    keypair: &ContactKeyPair,
    format: KeyFormat,
) -> Result<SecureVec, Error>
Expand description

Exports a contact private key in the requested format.

Private-key output is returned as SecretVec so the serialized secret material is zeroized on drop. LockboxPem, Jwk, and Jwks include both public-key metadata and the private key record; RawHex contains only the private key record bytes encoded as hexadecimal text.