pub fn encrypt_with_key( key: &[u8], data: &[u8], version: Version) -> Result<Vec<u8>>
Encrypts data using a secret key.