Struct burble_crypto::Nonce
source · #[repr(transparent)]pub struct Nonce(_);Expand description
128-bit random nonce value ([Vol 3] Part H, Section 2.3.5.6).
Implementations§
source§impl Nonce
impl Nonce
sourcepub fn new() -> Self
pub fn new() -> Self
Generates a new non-zero random nonce value from the OS CSPRNG.
Panics
Panics if the OS CSPRNG is broken.
sourcepub fn f4(&self, u: &PublicKeyX, v: &PublicKeyX, z: u8) -> Confirm
pub fn f4(&self, u: &PublicKeyX, v: &PublicKeyX, z: u8) -> Confirm
Generates LE Secure Connections confirm value ([Vol 3] Part H, Section 2.2.6).
sourcepub fn g2(&self, pkax: &PublicKeyX, pkbx: &PublicKeyX, nb: &Self) -> NumCompare
pub fn g2(&self, pkax: &PublicKeyX, pkbx: &PublicKeyX, nb: &Self) -> NumCompare
Generates LE Secure Connections numeric comparison value ([Vol 3] Part H, Section 2.2.9).