pub struct SymmetricKeyEnvelope {
cose_encrypt0: CoseEncrypt0,
}Expand description
A symmetric key protected by another symmetric key
Fields§
§cose_encrypt0: CoseEncrypt0Implementations§
Source§impl SymmetricKeyEnvelope
impl SymmetricKeyEnvelope
Sourcepub fn seal<Ids: KeyIds>(
key_to_seal: Ids::Symmetric,
sealing_key: Ids::Symmetric,
namespace: SymmetricKeyEnvelopeNamespace,
ctx: &KeyStoreContext<'_, Ids>,
) -> Result<Self, SymmetricKeyEnvelopeError>
pub fn seal<Ids: KeyIds>( key_to_seal: Ids::Symmetric, sealing_key: Ids::Symmetric, namespace: SymmetricKeyEnvelopeNamespace, ctx: &KeyStoreContext<'_, Ids>, ) -> Result<Self, SymmetricKeyEnvelopeError>
Seals a symmetric key with another symmetric key from the key store.
This should never fail, except for memory allocation errors.
Sourcepub fn unseal<Ids: KeyIds>(
&self,
wrapping_key: Ids::Symmetric,
namespace: SymmetricKeyEnvelopeNamespace,
ctx: &mut KeyStoreContext<'_, Ids>,
) -> Result<Ids::Symmetric, SymmetricKeyEnvelopeError>
pub fn unseal<Ids: KeyIds>( &self, wrapping_key: Ids::Symmetric, namespace: SymmetricKeyEnvelopeNamespace, ctx: &mut KeyStoreContext<'_, Ids>, ) -> Result<Ids::Symmetric, SymmetricKeyEnvelopeError>
Unseals a symmetric key from the envelope and stores it in the key store context.
Sourcepub fn contained_key_id(
&self,
) -> Result<Option<KeyId>, SymmetricKeyEnvelopeError>
pub fn contained_key_id( &self, ) -> Result<Option<KeyId>, SymmetricKeyEnvelopeError>
Get the key ID of the contained key.
Trait Implementations§
Source§impl Debug for SymmetricKeyEnvelope
impl Debug for SymmetricKeyEnvelope
Source§impl<'de> Deserialize<'de> for SymmetricKeyEnvelope
impl<'de> Deserialize<'de> for SymmetricKeyEnvelope
Source§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
Source§impl From<&SymmetricKeyEnvelope> for Vec<u8>
impl From<&SymmetricKeyEnvelope> for Vec<u8>
Source§fn from(val: &SymmetricKeyEnvelope) -> Self
fn from(val: &SymmetricKeyEnvelope) -> Self
Converts to this type from the input type.
Source§impl From<SymmetricKeyEnvelope> for String
impl From<SymmetricKeyEnvelope> for String
Source§fn from(val: SymmetricKeyEnvelope) -> Self
fn from(val: SymmetricKeyEnvelope) -> Self
Converts to this type from the input type.
Source§impl FromStr for SymmetricKeyEnvelope
impl FromStr for SymmetricKeyEnvelope
Source§impl FromWasmAbi for SymmetricKeyEnvelope
Available on crate feature wasm only.
impl FromWasmAbi for SymmetricKeyEnvelope
Available on crate feature
wasm only.Source§impl Serialize for SymmetricKeyEnvelope
impl Serialize for SymmetricKeyEnvelope
Source§impl WasmDescribe for SymmetricKeyEnvelope
Available on crate feature wasm only.
impl WasmDescribe for SymmetricKeyEnvelope
Available on crate feature
wasm only.Auto Trait Implementations§
impl Freeze for SymmetricKeyEnvelope
impl RefUnwindSafe for SymmetricKeyEnvelope
impl Send for SymmetricKeyEnvelope
impl Sync for SymmetricKeyEnvelope
impl Unpin for SymmetricKeyEnvelope
impl UnsafeUnpin for SymmetricKeyEnvelope
impl UnwindSafe for SymmetricKeyEnvelope
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<I> IntoResettable<String> for I
impl<I> IntoResettable<String> for I
§fn into_resettable(self) -> Resettable<String>
fn into_resettable(self) -> Resettable<String>
Convert to the intended resettable type