Struct snapper_box::crypto::key::DerivedKey [−][src]
pub struct DerivedKey { /* fields omitted */ }Expand description
A key that has been derived from a RootKey
This will have an encryption key and an hmac key derived from the RootKey’s entropy pool, using
Blake3 in key-derivation mode, keyed with the RootKey’s hmac key.
This struct also contains the context string that was used to derive it, as a way to validate key provenance, or possibly reconstruct a key after a corruption occurs.
Implementations
Encrypts the given DerivedKey into an EncryptedDerivedKey using the given RootKey.
This method packs the derived key into a ClearText box, and then encrypts it to a CipherText
box, without enabling compression.
See the documentation for CipherText for a description of the encryption method.
Errors
Will error if the encryption or serialization fail
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for DerivedKey
impl Send for DerivedKey
impl Sync for DerivedKey
impl Unpin for DerivedKey
impl UnwindSafe for DerivedKey
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more