#[must_use]
pub struct Nonce { /* fields omitted */ }
A type that represents a Nonce
that XChaCha20 and XChaCha20Poly1305 use.
An exception will be thrown if:
slice
is not 24 bytes.
- The
OsRng
fails to initialize or read from its source.
Make an object from a given byte slice.
Return the object as byte slice.
Randomly generate using a CSPRNG. Not available in no_std
context.
Return the length of the object.
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static