INNER CODE UNIT · Rust
get
matrix-org/vodozemac · src/ecies/mod.rs:130
fn get(&mut self) -> Nonce {
let current = self.inner;
let (new_nonce, _) = self.inner.overflowing_add(1);
self.inner = new_nonce;
let mut nonce = [0u8; 12];
nonce.copy_from_slice(¤t.to_le_bytes()[..12]);
Nonce::from_iter(nonce)
}
}
/// The result of an inbound ECIES channel establishment.
#[derive(Debug)]
pub struct InboundCreationResult {
/// The established ECIES channel.
pub ecies: EstablishedEcies,
/// The plaintext of the initial message.