use hpke_crypto::Crypto;
#[test_case::test_matrix(
[
hpke_crypto::backend::HpkeCryptoAwsLc::new().unwrap(),
hpke_crypto::backend::HpkeCryptoGraviola::new().unwrap(),
],
[
hpke_crypto::backend::HpkeCryptoAwsLc::new().unwrap(),
hpke_crypto::backend::HpkeCryptoGraviola::new().unwrap(),
]
)]
fn test_secure_random_fill(mut backend_1: impl Crypto, mut backend_2: impl Crypto) {
let mut buf1 = [0u8; 32];
let mut buf2 = [0u8; 32];
backend_1
.secure_random_fill(&mut buf1)
.unwrap();
backend_2
.secure_random_fill(&mut buf2)
.unwrap();
assert_ne!(buf1, buf2);
}