You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: keylime-agent/src/crypto.rs
+3-3
Original file line number
Diff line number
Diff line change
@@ -664,7 +664,7 @@ mod tests {
664
664
let iv = b"ABCDEFGHIJKLMNOP";
665
665
let plaintext = b"test string, longer than the block size";
666
666
let result = encrypt_aead(&key[..],&iv[..],&plaintext[..]);
667
-
assert!(matches!(result,Err(_)));
667
+
assert!(result.is_err())
668
668
}
669
669
670
670
#[test]
@@ -673,15 +673,15 @@ mod tests {
673
673
let iv = b"ABCDEFGHIJKLMN";
674
674
let plaintext = b"test string, longer than the block size";
675
675
let result = encrypt_aead(&key[..],&iv[..],&plaintext[..]);
676
-
assert!(matches!(result,Err(_)));
676
+
assert!(result.is_err())
677
677
}
678
678
679
679
#[test]
680
680
fntest_decrypt_aead_invalid_key_length(){
681
681
let key = b"0123456789012345012345678901234";
682
682
let ciphertext = hex::decode("4142434445464748494A4B4C4D4E4F50FCE7CA78C08FB1D5E04DB3C4AA6B6ED2F09C4AD7985BD1DB9FF15F9FDA869D0C01B27FF4618737BB53C84D256455AAB53B9AC7EAF88C4B").unwrap();//#[allow_ci]
683
683
let result = decrypt_aead(&key[..],&ciphertext[..]);
0 commit comments