Struct sodiumoxide::crypto::box_::curve25519xsalsa20poly1305::Nonce [−][src]
Expand description
Nonce
for asymmetric authenticated encryption
Implementations
from_slice()
creates an object from a byte slice
This function will fail and return None
if the length of
the byte-slice isn’t equal to the length of the object
increment_le()
treats the nonce as an unsigned little-endian number and
returns an incremented version of it.
WARNING: this method does not check for arithmetic overflow. It is the callers responsibility to ensure that any given nonce value is only used once. If the caller does not do that the cryptographic primitives in sodiumoxide will not uphold any security guarantees (i.e. they will break)
increment_le_inplace()
treats the nonce as an unsigned little-endian number
and increments it.
WARNING: this method does not check for arithmetic overflow. It is the callers responsibility to ensure that any given nonce value is only used once. If the caller does not do that the cryptographic primitives in sodiumoxide will not uphold any security guarantees.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..b] == y[a..b]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..] == y[a..]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[] == y[]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[..b] == y[..b]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Nonce
impl UnwindSafe for Nonce
Blanket Implementations
Mutably borrows from an owned value. Read more