Skip to main content

decrypt_data

Function decrypt_data 

Source
pub fn decrypt_data(data: &[u8], key: &[u8]) -> Result<Vec<u8>, CloudError>
Expand description

Decrypts data that was encrypted with encrypt_data.

Expects the input format: nonce (12 bytes) || ciphertext || tag (16 bytes)

§Arguments

  • data - The encrypted data with prepended nonce
  • key - The 32-byte encryption key

§Returns

The decrypted plaintext data.