()
| 62 | |
| 63 | #[test] |
| 64 | fn zeroize_bytes() { |
| 65 | for len in [0, 1, 15, 16, 17, 31, 32, 33] { |
| 66 | let mut bytes = [42u8; 35]; |
| 67 | zeroize::zeroize_bytes(&mut bytes[1..1 + len]); |
| 68 | |
| 69 | assert_eq!(bytes[0], 42); |
| 70 | assert!(bytes[1..1 + len].iter().all(|&byte| byte == 0)); |
| 71 | assert!(bytes[1 + len..].iter().all(|&byte| byte == 42)); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | #[test] |
| 76 | fn zeroize_on_drop_byte_arrays() { |
nothing calls this directly
no outgoing calls
no test coverage detected