()
| 532 | |
| 533 | #[test] |
| 534 | fn empty_payload() { |
| 535 | let key = test_key(); |
| 536 | let epoch = *key.epoch(); |
| 537 | let header = test_header(1); |
| 538 | |
| 539 | let ciphertext = key.encrypt(1, &header, b"").unwrap(); |
| 540 | assert_eq!(ciphertext.len(), AUTH_TAG_SIZE); // Just the tag. |
| 541 | |
| 542 | let decrypted = key.decrypt(&epoch, 1, &header, &ciphertext).unwrap(); |
| 543 | assert!(decrypted.is_empty()); |
| 544 | } |
| 545 | |
| 546 | #[test] |
| 547 | fn different_lsns_produce_different_ciphertext() { |
nothing calls this directly
no test coverage detected