FINALLY WORKS (yay), integration test

This commit is contained in:
Neemek 2025-10-09 20:25:12 +02:00
parent eebad9991a
commit 2c7a005d7c
4 changed files with 164 additions and 57 deletions

17
tests/random.rs Normal file
View file

@ -0,0 +1,17 @@
#![cfg(feature = "rand")]
use diffie_hellman::{Public, Secret};
#[test]
fn random_dh_key_exchange() {
let a = Secret::random();
let b = Secret::random();
let pa = Public::from(&a);
let pb = Public::from(&b);
let sa = a.diffie_hellman(&pb);
let sb = b.diffie_hellman(&pa);
println!("{} == {}", sa, sb)
}