Struct lock_keeper::crypto::generic::EncryptionKey
source · pub(super) struct EncryptionKey {
key: Box<Key>,
pub(super) context: AssociatedData,
}
Expand description
A well-formed symmetric encryption key for an AEAD scheme.
Fields§
§key: Box<Key>
§context: AssociatedData
Implementations§
source§impl EncryptionKey
impl EncryptionKey
pub(super) fn domain_separator() -> &'static str
sourcepub(super) fn new(rng: &mut (impl CryptoRng + RngCore)) -> Self
pub(super) fn new(rng: &mut (impl CryptoRng + RngCore)) -> Self
Generate a new symmetric AEAD encryption key from scratch.
pub(super) fn from_bytes( key_material: [u8; 32], context: AssociatedData ) -> Self
pub(super) fn into_bytes(self) -> [u8; 32]
Trait Implementations§
source§impl Clone for EncryptionKey
impl Clone for EncryptionKey
source§fn clone(&self) -> EncryptionKey
fn clone(&self) -> EncryptionKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EncryptionKey
impl Debug for EncryptionKey
source§impl Drop for EncryptionKey
impl Drop for EncryptionKey
source§impl Hash for EncryptionKey
impl Hash for EncryptionKey
source§impl PartialEq for EncryptionKey
impl PartialEq for EncryptionKey
source§fn eq(&self, other: &EncryptionKey) -> bool
fn eq(&self, other: &EncryptionKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Zeroize for EncryptionKey
impl Zeroize for EncryptionKey
impl Eq for EncryptionKey
impl StructuralPartialEq for EncryptionKey
Auto Trait Implementations§
impl Freeze for EncryptionKey
impl RefUnwindSafe for EncryptionKey
impl Send for EncryptionKey
impl Sync for EncryptionKey
impl Unpin for EncryptionKey
impl UnwindSafe for EncryptionKey
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request