pub enum Wrap {
AesKeyWrap,
AesKeyWrapPad,
RsaPkcs,
RsaPkcsOaep,
VendorThalesAesKwp,
}Expand description
The wrapping mechanism to use.
Variants§
Implementations§
Source§impl Wrap
impl Wrap
pub fn mechanism(&self) -> Result<Mechanism<'_>>
pub fn wrapping_key( &self, session: &Session, label: Option<&str>, ) -> Result<ObjectHandle>
pub fn unwrapping_key( &self, session: &Session, label: Option<&str>, ) -> Result<ObjectHandle>
pub fn check_key(&self, session: &Session, key: ObjectHandle) -> Result<()>
pub fn wrap( &self, session: &Session, key: ObjectHandle, wrapping_key_label: Option<&str>, ) -> Result<Vec<u8>>
pub fn unwrap( &self, session: &Session, wrapped_key: &[u8], wrapping_key_label: Option<&str>, template: &AttributeMap, ) -> Result<ObjectHandle>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Wrap
impl<'de> Deserialize<'de> for Wrap
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<WrapPrivateKey> for Wrap
impl From<WrapPrivateKey> for Wrap
Source§fn from(wrap: WrapPrivateKey) -> Self
fn from(wrap: WrapPrivateKey) -> Self
Converts to this type from the input type.
impl Copy for Wrap
impl Eq for Wrap
impl StructuralPartialEq for Wrap
Auto Trait Implementations§
impl Freeze for Wrap
impl RefUnwindSafe for Wrap
impl Send for Wrap
impl Sync for Wrap
impl Unpin for Wrap
impl UnwindSafe for Wrap
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.§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>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.