Skip to content

Commit

Permalink
fix: Update expected values in padding tests for transparent sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
tux3 committed Dec 19, 2022
1 parent 23f05be commit d86bd16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/stream_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 2 additions & 1 deletion tests/tanker_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit d86bd16

Please sign in to comment.