Function encrypt_private_key
Source pub fn encrypt_private_key(
private_key: &PrivateKey,
encryption_key: impl AsRef<[u8]>,
) -> Result<(Vec<u8>, Vec<u8>)>
Expand description
Encrypt a private key with a password-derived encryption key.
§Arguments
private_key - The signing key to encrypt
encryption_key - The 32-byte encryption key
§Returns
A tuple of (ciphertext, nonce) where:
- ciphertext is the encrypted private key
- nonce is the 12-byte nonce used for encryption