[]Struct yubihsm::capability::Capability

pub struct Capability { /* fields omitted */ }

Object attributes specifying which operations are allowed to be performed

https://developers.yubico.com/YubiHSM2/Concepts/Capability.html

Methods

impl Capability

pub const DERIVE_ECDH: Capability

derive-ecdh: perform ECDH operation

pub const DECRYPT_OAEP: Capability

decrypt-oaep: perform RSA-OAEP decryption

pub const DECRYPT_PKCS: Capability

decrypt-pkcs: perform RSA-PKCS1v1.5 decryption

pub const GENERATE_ASYMMETRIC_KEY: Capability

generate-asymmetric-key: generate asymmetric objects

pub const SIGN_ECDSA: Capability

sign-ecdsa: compute ECDSA digital signature

pub const SIGN_EDDSA: Capability

sign-eddsa: compute EdDSA (i.e. Ed25519) digital signature

pub const SIGN_PKCS: Capability

sign-pkcs: compute RSA-PKCS1v1.5 digital signature

pub const SIGN_PSS: Capability

sign-pss: compute RSA-PSS digital signature

pub const SIGN_ATTESTATION_CERTIFICATE: Capability

sign-attestation-certificate: create attestation (i.e. X.509 certificate) about an asymmetric object

pub const GET_LOG_ENTRIES: Capability

get-log-entries: read the log store

pub const DELETE_ASYMMETRIC_KEY: Capability

delete-asymmetric-key: delete asymmetric key objects

pub const DELETE_AUTHENTICATION_KEY: Capability

delete-authentication-key: delete authentication::Key objects

pub const DELETE_HMAC_KEY: Capability

delete-hmac-key: delete HMACKey objects

pub const DELETE_OPAQUE: Capability

delete-opaque: delete opaque objects

pub const DELETE_OTP_AEAD_KEY: Capability

delete-otp-aead-key: delete Yubic OTP AEAD key objects

pub const DELETE_TEMPLATE: Capability

delete-template: delete template objects

pub const DELETE_WRAP_KEY: Capability

delete-wrap-key: delete WrapKey objects

pub const EXPORTABLE_UNDER_WRAP: Capability

exportable-under-wrap: mark an object as exportable under keywrap

pub const EXPORT_WRAPPED: Capability

export-wrapped: export objects under keywrap

pub const GENERATE_OTP_AEAD_KEY: Capability

generate-otp-aead-key: generate Yubico OTP AEAD objects

pub const GENERATE_WRAP_KEY: Capability

generate-wrap-key: generate wrapkey objects

pub const GET_OPAQUE: Capability

get-opaque: read opaque objects

pub const GET_OPTION: Capability

get-option: read device-global options

pub const GET_PSEUDO_RANDOM: Capability

get-pseudo-random: extract random bytes

pub const GET_TEMPLATE: Capability

get-template: read SSH template objects

pub const GENERATE_HMAC_KEY: Capability

generate-hmac-key: generate HMAC key objects

pub const SIGN_HMAC: Capability

sign-hmac: compute HMAC for data

pub const VERIFY_HMAC: Capability

verify-hmac: verify HMAC for data

pub const IMPORT_WRAPPED: Capability

import-wrapped: import keywrapped objects

pub const CREATE_OTP_AEAD: Capability

create-otp-aead: create an OTP AEAD

pub const RANDOMIZE_OTP_AEAD: Capability

randomize-otp-aead: create an OTP AEAD from random data

pub const REWRAP_FROM_OTP_AEAD_KEY: Capability

rewrap-from-otp-aead-key: rewrap AEADs from an OTP AEAD key object to another

pub const REWRAP_TO_OTP_AEAD_KEY: Capability

rewrap-to-otp-aead-key: rewrap AEADs to an OTP AEAD key object from another

pub const DECRYPT_OTP: Capability

decrypt-otp: decrypt OTP

pub const PUT_ASYMMETRIC_KEY: Capability

put-asymmetric-key: write asymmetric objects

pub const PUT_AUTHENTICATION_KEY: Capability

put-authentication-key: write authentication key objects

pub const PUT_HMAC_KEY: Capability

put-hmac-key: write HMAC key objects

pub const PUT_OPAQUE: Capability

put-opaque: Write Opaque Objects

pub const PUT_OPTION: Capability

set-option: write device-global options

pub const PUT_OTP_AEAD_KEY: Capability

put-otp-aead-key: write OTP AEAD key objects

pub const PUT_TEMPLATE: Capability

put-template: write template objects

pub const PUT_WRAP_KEY: Capability

put-wrap-key: write WrapKey objects

pub const RESET_DEVICE: Capability

reset-device: factory reset the device

pub const SIGN_SSH_CERTIFICATE: Capability

sign-ssh-certificate: sign SSH certificates

pub const UNWRAP_DATA: Capability

unwrap-data: unwrap user-provided data

pub const WRAP_DATA: Capability

wrap-data: wrap user-provided data

pub const CHANGE_AUTHENTICATION_KEY: Capability

change-authentication-key: overwrite existing authentication key with new one

pub const UNKNOWN_CAPABILITY_47: Capability

unknown capability: bit 47

pub const UNKNOWN_CAPABILITY_48: Capability

unknown capability: bit 48

pub const UNKNOWN_CAPABILITY_49: Capability

unknown capability: bit 49

pub const UNKNOWN_CAPABILITY_50: Capability

unknown capability: bit 50

pub const UNKNOWN_CAPABILITY_51: Capability

unknown capability: bit 51

pub const UNKNOWN_CAPABILITY_52: Capability

unknown capability: bit 52

pub const UNKNOWN_CAPABILITY_53: Capability

unknown capability: bit 53

pub const UNKNOWN_CAPABILITY_54: Capability

unknown capability: bit 54

pub const UNKNOWN_CAPABILITY_55: Capability

unknown capability: bit 55

pub const UNKNOWN_CAPABILITY_56: Capability

unknown capability: bit 56

pub const UNKNOWN_CAPABILITY_57: Capability

unknown capability: bit 57

pub const UNKNOWN_CAPABILITY_58: Capability

unknown capability: bit 58

pub const UNKNOWN_CAPABILITY_59: Capability

unknown capability: bit 59

pub const UNKNOWN_CAPABILITY_60: Capability

unknown capability: bit 60

pub const UNKNOWN_CAPABILITY_61: Capability

unknown capability: bit 61

pub const UNKNOWN_CAPABILITY_62: Capability

unknown capability: bit 62

pub const UNKNOWN_CAPABILITY_63: Capability

unknown capability: bit 63

pub fn empty() -> Capability

Returns an empty set of flags.

pub fn all() -> Capability

Returns the set containing all flags.

pub fn bits(&self) -> u64

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u64) -> Option<Capability>

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub fn from_bits_truncate(bits: u64) -> Capability

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

pub fn is_all(&self) -> bool

Returns true if all flags are currently set.

pub fn intersects(&self, other: Capability) -> bool

Returns true if there are flags common to both self and other.

pub fn contains(&self, other: Capability) -> bool

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: Capability)

Inserts the specified flags in-place.

pub fn remove(&mut self, other: Capability)

Removes the specified flags in-place.

pub fn toggle(&mut self, other: Capability)

Toggles the specified flags in-place.

pub fn set(&mut self, other: Capability, value: bool)

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl PartialEq<Capability> for Capability

impl Default for Capability[src]

impl Ord for Capability

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Clone for Capability

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

Performs copy-assignment from source. Read more

impl Extend<Capability> for Capability

impl Eq for Capability

impl Copy for Capability

impl PartialOrd<Capability> for Capability

impl Display for Capability[src]

impl Hash for Capability

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Sub<Capability> for Capability

type Output = Capability

The resulting type after applying the - operator.

fn sub(self, other: Capability) -> Capability

Returns the set difference of the two sets of flags.

impl SubAssign<Capability> for Capability

fn sub_assign(&mut self, other: Capability)

Disables all flags enabled in the set.

impl Not for Capability

type Output = Capability

The resulting type after applying the ! operator.

fn not(self) -> Capability

Returns the complement of this set of flags.

impl BitAnd<Capability> for Capability

type Output = Capability

The resulting type after applying the & operator.

fn bitand(self, other: Capability) -> Capability

Returns the intersection between the two sets of flags.

impl BitOr<Capability> for Capability

type Output = Capability

The resulting type after applying the | operator.

fn bitor(self, other: Capability) -> Capability

Returns the union of the two sets of flags.

impl BitXor<Capability> for Capability

type Output = Capability

The resulting type after applying the ^ operator.

fn bitxor(self, other: Capability) -> Capability

Returns the left flags, but with all the right flags toggled.

impl BitAndAssign<Capability> for Capability

fn bitand_assign(&mut self, other: Capability)

Disables all flags disabled in the set.

impl BitOrAssign<Capability> for Capability

fn bitor_assign(&mut self, other: Capability)

Adds the set of flags.

impl BitXorAssign<Capability> for Capability

fn bitxor_assign(&mut self, other: Capability)

Toggles the set of flags.

impl FromIterator<Capability> for Capability

impl Debug for Capability

impl FromStr for Capability[src]

type Err = ()

The associated error which can be returned from parsing.

impl Octal for Capability

impl Binary for Capability

impl LowerHex for Capability

impl UpperHex for Capability

impl Serialize for Capability[src]

impl<'de> Deserialize<'de> for Capability[src]

Auto Trait Implementations

impl Send for Capability

impl Sync for Capability

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self