mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
x3dh: One more message for safety.
This commit is contained in:
@@ -620,7 +620,15 @@ fn main() -> Result<()> {
|
||||
let mut bob_ratchet_state_clone = bob_ratchet_state.clone();
|
||||
let plaintext = bob_ratchet_state_clone.ratchet_decrypt(header1, &ciphertext1, &[]);
|
||||
assert_eq!(plaintext, message_to_bob1);
|
||||
//bob_ratchet_state = bob_ratchet_state_clone;
|
||||
bob_ratchet_state = bob_ratchet_state_clone;
|
||||
|
||||
let message_to_alice = b"weaponised autism";
|
||||
let (header, ciphertext) = bob_ratchet_state.ratchet_encrypt(message_to_alice, &[]);
|
||||
|
||||
let mut alice_ratchet_state_clone = alice_ratchet_state.clone();
|
||||
let plaintext = alice_ratchet_state_clone.ratchet_decrypt(header, &ciphertext, &[]);
|
||||
assert_eq!(plaintext, message_to_alice);
|
||||
//alice_ratchet_state = alice_ratchet_state_clone;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user