[][src]Struct yubihsm::wrap::Key

pub struct Key { /* fields omitted */ }

Wrap key to import into the device

Methods

impl Key[src]

pub fn generate_random(key_id: Id, algorithm: Algorithm) -> Self[src]

Generate a random wrap key with the given key size.

pub fn from_bytes(key_id: Id, bytes: &[u8]) -> Result<Self, DeviceError>[src]

Create a new wrap::Key instance. Must be 16, 24, or 32-bytes long.

pub fn label(self, label: Label) -> Self[src]

Set the object label on this key

pub fn domains(self, domains: Domain) -> Self[src]

Set the domains this wrap key can be used in (default: all)

pub fn capabilities(self, capabilities: Capability) -> Self[src]

Set the capabilities of this key (what it can be used for)

pub fn delegated_capabilities(self, capabilities: Capability) -> Self[src]

Set the delegated capabilities of this key (what capabilities it can set on imported objects)

pub fn create(&self, client: &mut Client) -> Result<(), ClientError>[src]

Create this key within the HSM

Trait Implementations

impl Clone for Key[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Drop for Key[src]

impl Debug for Key[src]

Auto Trait Implementations

impl Send for Key

impl Sync for Key

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self