Struct bdrck::crypto::key::WrappedKey

source ·
pub struct WrappedKey { /* private fields */ }
Expand description

A wrapped key is a Key which has been wrapped (encrypted) with another key. This is useful because it lets us have e.g. a single “master key” which is wrapped by several sub-keys, which can be added / removed at will without having to actually re-encrypt all of the data encrypted with the “master key”.

Implementations

Return a digest/signature computed from this key.

Return the digest/signature of the outermost key used to wrap this key.

Unwrap this WrappedKey using the given key for decryption. This can return either a Key, or another WrappedKey if the underlying key was wrapped more than one time.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more
This function “wraps” (encrypts, roughly) self with the given AbstractKey. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.