Struct orion::hazardous::stream::xchacha20::Nonce [−][src]
pub struct Nonce { /* fields omitted */ }
Expand description
Implementations
Construct from a given byte slice.
This is supported on crate feature safe_api
only.
This is supported on crate feature
safe_api
only.Randomly generate using a CSPRNG. Not available in no_std
context.
Trait Implementations
This type tries to deserialize as a Vec<u8>
would. If it succeeds, the digest
will be built using Self::from_slice
.
Note that this allocates once to store the referenced bytes on the heap.
Deserialize this value from the given Serde deserializer. Read more
This type tries to serialize as a &[u8]
would. Note that the serialized
type likely does not have the same protections that orion provides, such
as constant-time operations. A good rule of thumb is to only serialize
these types for storage. Don’t operate on the serialized types.
Delegates to from_slice
implementation
Auto Trait Implementations
impl RefUnwindSafe for Nonce
impl UnwindSafe for Nonce
Blanket Implementations
Mutably borrows from an owned value. Read more