Function devolutions_crypto_wayk::bastion::fle::decrypt_field[][src]

pub fn decrypt_field(
    master_key_id: Uuid,
    key: &[u8],
    encrypted_content: &str
) -> Result<Vec<u8>, Error>

Decrypts field-level content.

  • Input is the encrypted key encoded in base64.
  • Master Key ID is used for early key mismatch detection.
  • Output is decrypted field content.

Internals

  • Decryption is done using XChaCha2020-Poly1035.
  • Data layout is assumed to be the same as described in encrypt_field_with_block_size.