pub struct Key { /* private fields */ }
Expand description
Wrap key to import into the device
Implementations§
source§impl Key
impl Key
sourcepub fn generate_random(key_id: Id, algorithm: Algorithm) -> Self
pub fn generate_random(key_id: Id, algorithm: Algorithm) -> Self
Generate a random wrap key with the given key size.
sourcepub fn from_bytes(key_id: Id, bytes: &[u8]) -> Result<Self, Error>
pub fn from_bytes(key_id: Id, bytes: &[u8]) -> Result<Self, Error>
Create a new wrap::Key
instance. Must be 16, 24, or 32-bytes long.
sourcepub fn domains(self, domains: Domain) -> Self
pub fn domains(self, domains: Domain) -> Self
Set the domains this wrap key can be used in (default: all)
sourcepub fn capabilities(self, capabilities: Capability) -> Self
pub fn capabilities(self, capabilities: Capability) -> Self
Set the capabilities of this key (what it can be used for)
sourcepub fn delegated_capabilities(self, capabilities: Capability) -> Self
pub fn delegated_capabilities(self, capabilities: Capability) -> Self
Set the delegated capabilities of this key (what capabilities it can set on imported objects)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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