diff --git a/tests/stream_tests.rs b/tests/stream_tests.rs index 9fed5a9..9d7426c 100644 --- a/tests/stream_tests.rs +++ b/tests/stream_tests.rs @@ -81,7 +81,7 @@ async fn encrypt_stream_with_padding() -> Result<(), futures::io::Error> { let mut encrypted = Vec::new(); encrypted_stream.read_to_end(&mut encrypted).await.unwrap(); - assert_eq!(encrypted.len(), 3146248); + assert_eq!(encrypted.len(), 3 * 1024 * 1024 + 389); let mut decrypted_stream = tanker.decrypt_stream(encrypted.as_slice()).await?; let mut decrypted = Vec::new(); diff --git a/tests/tanker_tests.rs b/tests/tanker_tests.rs index 322a1ed..ad96f57 100644 --- a/tests/tanker_tests.rs +++ b/tests/tanker_tests.rs @@ -73,7 +73,8 @@ async fn encrypt_and_decrypt() -> Result<(), Error> { Ok(()) } -const SIMPLE_ENCRYPTION_OVERHEAD: usize = 17; +// Encryption format v10 overhead +const SIMPLE_ENCRYPTION_OVERHEAD: usize = 49; const SIMPLE_PADDED_ENCRYPTION_OVERHEAD: usize = SIMPLE_ENCRYPTION_OVERHEAD + 1; #[tokio::test(flavor = "multi_thread")]