Struct fortresscrypto::MasterKey [−][src]
Methods
impl MasterKey
[src]
impl MasterKey
pub fn from_slice(bs: &[u8]) -> Option<MasterKey>
[src]
pub fn from_slice(bs: &[u8]) -> Option<MasterKey>
from_slice()
creates an object from a byte slice
This function will fail and return None
if the length of
the byte-s;ice isn't equal to the length of the object
pub fn from_rng<R: Rng>(rng: &mut R) -> MasterKey
[src]
pub fn from_rng<R: Rng>(rng: &mut R) -> MasterKey
impl MasterKey
[src]
impl MasterKey
Trait Implementations
impl Clone for MasterKey
[src]
impl Clone for MasterKey
fn clone(&self) -> MasterKey
[src]
fn clone(&self) -> MasterKey
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)
Performs copy-assignment from source
. Read more
impl Rand for MasterKey
[src]
impl Rand for MasterKey
fn rand<R: Rng>(rng: &mut R) -> MasterKey
[src]
fn rand<R: Rng>(rng: &mut R) -> MasterKey
Generates a random instance of this type using the specified source of randomness. Read more
impl PartialEq for MasterKey
[src]
impl PartialEq for MasterKey
fn eq(&self, MasterKey: &MasterKey) -> bool
[src]
fn eq(&self, MasterKey: &MasterKey) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for MasterKey
[src]
impl Eq for MasterKey
impl Serialize for MasterKey
[src]
impl Serialize for MasterKey
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for MasterKey
[src]
impl<'de> Deserialize<'de> for MasterKey
fn deserialize<D>(deserializer: D) -> Result<MasterKey, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<MasterKey, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Index<Range<usize>> for MasterKey
[src]
impl Index<Range<usize>> for MasterKey
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.
type Output = [u8]
The returned type after indexing.
fn index(&self, _index: Range<usize>) -> &[u8]
[src]
fn index(&self, _index: Range<usize>) -> &[u8]
Performs the indexing (container[index]
) operation.
impl Index<RangeTo<usize>> for MasterKey
[src]
impl Index<RangeTo<usize>> for MasterKey
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.
type Output = [u8]
The returned type after indexing.
fn index(&self, _index: RangeTo<usize>) -> &[u8]
[src]
fn index(&self, _index: RangeTo<usize>) -> &[u8]
Performs the indexing (container[index]
) operation.
impl Index<RangeFrom<usize>> for MasterKey
[src]
impl Index<RangeFrom<usize>> for MasterKey
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.
type Output = [u8]
The returned type after indexing.
fn index(&self, _index: RangeFrom<usize>) -> &[u8]
[src]
fn index(&self, _index: RangeFrom<usize>) -> &[u8]
Performs the indexing (container[index]
) operation.
impl Index<RangeFull> for MasterKey
[src]
impl Index<RangeFull> for MasterKey
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.
type Output = [u8]
The returned type after indexing.
fn index(&self, _index: RangeFull) -> &[u8]
[src]
fn index(&self, _index: RangeFull) -> &[u8]
Performs the indexing (container[index]
) operation.
impl Debug for MasterKey
[src]
impl Debug for MasterKey
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Drop for MasterKey
[src]
impl Drop for MasterKey