decrypt_key

Function decrypt_key 

Source
pub(crate) fn decrypt_key(encrypted_data: &[u8], pwd: &[u8]) -> Result<Vec<u8>>
Expand description

Decrypts data that was encrypted with encrypt_key

§Arguments

  • encrypted_data - The encrypted data containing salt, nonce, and ciphertext
  • pwd - The password bytes to derive the decryption key from

§Returns

  • Result<Vec<u8>> - The decrypted private key bytes

§Security

  • Verifies authentication tag to ensure data integrity
  • Uses the same PBKDF2 parameters as encryption