()
| 53 | |
| 54 | #[test] |
| 55 | fn test_aes_encrypt_decrypt_roundtrip() { |
| 56 | let original: Vec<u8> = vec![0xfc, 0x48, 0x83, 0xe4, 0xf0, 0xe8, 0xc0, 0x00, |
| 57 | 0x00, 0x00, 0x41, 0x51, 0x41, 0x50, 0x52, 0x51]; |
| 58 | let key: [u8; 32] = [0x01; 32]; |
| 59 | let iv: [u8; 16] = [0x02; 16]; |
| 60 | |
| 61 | let encrypted = aes_256_encrypt(&original, &key, &iv); |
| 62 | assert_ne!(encrypted, original); |
| 63 | |
| 64 | let cipher = Cipher::new_256(&key); |
| 65 | let decrypted = cipher.cbc_decrypt(&iv, &encrypted); |
| 66 | assert_eq!(decrypted, original); |
| 67 | } |
| 68 | |
| 69 | #[test] |
| 70 | fn test_encrypt_aes_returns_expected_fields() { |
nothing calls this directly
no test coverage detected