Struct safe_core::crypto::shared_secretbox::Key
[−]
[src]
pub struct Key(_);
Shared symmetric encryption key.
Methods
impl Key
[src]
fn new(inner: Key) -> Self
[src]
Create new safe-to-share key from the given regular key.
fn from_raw(data: &[u8; 32]) -> Self
[src]
Create new key from the given raw key data.
fn from_slice(data: &[u8]) -> Option<Self>
[src]
Create new key from the data in the given slice.
Methods from Deref<Target = Key>
Trait Implementations
impl Clone for Key
[src]
fn clone(&self) -> Key
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Key
[src]
impl PartialEq for Key
[src]
fn eq(&self, __arg_0: &Key) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Key) -> bool
[src]
This method tests for !=
.
impl Deref for Key
[src]
type Target = Key
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<'de> Deserialize<'de> for Key
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
Deserialize this value from the given Serde deserializer. Read more
impl Serialize for Key
[src]
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
[src]
Serialize this value into the given Serde serializer. Read more