Struct safe_crypto::Nonce [−][src]
pub struct Nonce { /* fields omitted */ }
Nonce structure used for authenticated symmetric encryption.
Methods
impl Nonce
[src]
impl Nonce
pub fn new() -> Self
[src]
pub fn new() -> Self
Generates a new nonce.
pub fn from_bytes(nonce: [u8; 24]) -> Self
[src]
pub fn from_bytes(nonce: [u8; 24]) -> Self
Create a nonce from bytes. Useful when it has been serialised.
pub fn into_bytes(self) -> [u8; 24]
[src]
pub fn into_bytes(self) -> [u8; 24]
Convert the Nonce
into the raw underlying bytes.
For anyone who wants to store the nonce.
Trait Implementations
impl Debug for Nonce
[src]
impl Debug for Nonce
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Nonce
[src]
impl PartialEq for Nonce
fn eq(&self, other: &Nonce) -> bool
[src]
fn eq(&self, other: &Nonce) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Nonce) -> bool
[src]
fn ne(&self, other: &Nonce) -> bool
This method tests for !=
.
impl Eq for Nonce
[src]
impl Eq for Nonce
impl Clone for Nonce
[src]
impl Clone for Nonce
fn clone(&self) -> Nonce
[src]
fn clone(&self) -> Nonce
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Default for Nonce
[src]
impl Default for Nonce