Main test function
()
| 73 | |
| 74 | // Main test function |
| 75 | fn main() { |
| 76 | let (public_key, private_key) = generate_keys(); |
| 77 | |
| 78 | // Test message |
| 79 | let message: u64 = 42; |
| 80 | assert!(message < public_key.n); |
| 81 | |
| 82 | let encrypted = encrypt(&public_key, message); |
| 83 | let decrypted = decrypt(&private_key, encrypted); |
| 84 | |
| 85 | // Check correctness |
| 86 | assert!(decrypted == message); |
| 87 | assert!(encrypted != message); // Make sure encryption changes the message |
| 88 | } |
nothing calls this directly
no test coverage detected