()
| 47 | |
| 48 | #[test] |
| 49 | fn test_dh_agree() { |
| 50 | use rand::Rng; |
| 51 | let secret = rand::thread_rng().gen::<[u8; 32]>(); |
| 52 | let pubkey = rand::thread_rng().gen::<[u8; 32]>(); |
| 53 | let shared = dh_agree(secret, pubkey); |
| 54 | assert_eq!(shared.len(), 32); |
| 55 | println!("secret: {:?}", hex::encode(secret)); |
| 56 | println!("pubkey: {:?}", hex::encode(pubkey)); |
| 57 | println!("shared: {:?}", hex::encode(shared)); |
| 58 | } |
| 59 | |
| 60 | #[test] |
| 61 | fn test_dh_decrypt_invalid_input() { |
nothing calls this directly
no test coverage detected