Struct yubihsm::capabilities::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
impl Capability
pub const ASYMMETRIC_DECRYPT_ECDH: Capability
ASYMMETRIC_DECRYPT_ECDH: Capability = Capability{bits: 2048,}
asymmetric_decrypt_ecdh: perform ECDH operation
pub const ASYMMETRIC_DECRYPT_OAEP: Capability
ASYMMETRIC_DECRYPT_OAEP: Capability = Capability{bits: 1024,}
asymmetric_decrypt_oaep: perform RSA-OAEP decryption
pub const ASYMMETRIC_DECRYPT_PKCS: Capability
ASYMMETRIC_DECRYPT_PKCS: Capability = Capability{bits: 512,}
asymmetric_decrypt_pkcs: perform RSA-PKCS1v1.5 decryption
pub const ASYMMETRIC_GEN: Capability
ASYMMETRIC_GEN: Capability = Capability{bits: 16,}
asymmetric_gen: generate asymmetric objects
pub const ASYMMETRIC_SIGN_ECDSA: Capability
ASYMMETRIC_SIGN_ECDSA: Capability = Capability{bits: 128,}
asymmetric_sign_ecdsa: compute ECDSA digital signature
pub const ASYMMETRIC_SIGN_EDDSA: Capability
ASYMMETRIC_SIGN_EDDSA: Capability = Capability{bits: 256,}
asymmetric_sign_eddsa: compute EdDSA (i.e. Ed25519) digital signature
pub const ASYMMETRIC_SIGN_PKCS: Capability
ASYMMETRIC_SIGN_PKCS: Capability = Capability{bits: 32,}
asymmetric_sign_pkcs: compute RSA-PKCS1v1.5 digital signature
pub const ASYMMETRIC_SIGN_PSS: Capability
ASYMMETRIC_SIGN_PSS: Capability = Capability{bits: 64,}
asymmetric_sign_pss: compute RSA-PSS digital signature
pub const ATTEST: Capability
ATTEST: Capability = Capability{bits: 17179869184,}
attest: create attestation (i.e. X.509 certificate) about an asymmetric object
pub const AUDIT: Capability
AUDIT: Capability = Capability{bits: 16777216,}
audit: read the log store
pub const DELETE_ASYMMETRIC: Capability
DELETE_ASYMMETRIC: Capability = Capability{bits: 2199023255552,}
delete_asymmetric: delete asymmetric key objects
pub const DELETE_AUTHKEY: Capability
DELETE_AUTHKEY: Capability = Capability{bits: 1099511627776,}
delete_auth_key: delete AuthKey objects
pub const DELETE_HMACKEY: Capability
DELETE_HMACKEY: Capability = Capability{bits: 8796093022208,}
delete_hmac_key: delete HMACKey objects
pub const DELETE_OPAQUE: Capability
DELETE_OPAQUE: Capability = Capability{bits: 549755813888,}
delete_opaque: delete opaque objects
pub const DELETE_OTP_AEAD_KEY: Capability
DELETE_OTP_AEAD_KEY: Capability = Capability{bits: 35184372088832,}
delete_otp_aead_key: delete OTPAEADKey objects
pub const DELETE_TEMPLATE: Capability
DELETE_TEMPLATE: Capability = Capability{bits: 17592186044416,}
delete_template: delete template objects
pub const DELETE_WRAPKEY: Capability
DELETE_WRAPKEY: Capability = Capability{bits: 4398046511104,}
delete_wrap_key: delete WrapKey objects
pub const EXPORT_UNDER_WRAP: Capability
EXPORT_UNDER_WRAP: Capability = Capability{bits: 65536,}
export_under_wrap: mark an object as exportable under keywrap
pub const EXPORT_WRAPPED: Capability
EXPORT_WRAPPED: Capability = Capability{bits: 4096,}
export_wrapped: export objects under keywrap
pub const GENERATE_OTP_AEAD_KEY: Capability
GENERATE_OTP_AEAD_KEY: Capability = Capability{bits: 68719476736,}
generate_otp_aead_key: generate OTPAEADKey objects
pub const GENERATE_WRAPKEY: Capability
GENERATE_WRAPKEY: Capability = Capability{bits: 32768,}
generate_wrapkey: generate wrapkey objects
pub const GET_OPAQUE: Capability
GET_OPAQUE: Capability = Capability{bits: 1,}
get_opaque: read opaque objects
pub const GET_OPTION: Capability
GET_OPTION: Capability = Capability{bits: 262144,}
get_option: read device-global options
pub const GET_RANDOMNESS: Capability
GET_RANDOMNESS: Capability = Capability{bits: 524288,}
get_randomness: extract random bytes
pub const GET_TEMPLATE: Capability
GET_TEMPLATE: Capability = Capability{bits: 67108864,}
get_template: read template objects
pub const HMACKEY_GENERATE: Capability
HMACKEY_GENERATE: Capability = Capability{bits: 2097152,}
hmackey_generate: generate HMACKey objects
pub const HMAC_DATA: Capability
HMAC_DATA: Capability = Capability{bits: 4194304,}
hmac_data: compute HMAC for data
pub const HMAC_VERIFY: Capability
HMAC_VERIFY: Capability = Capability{bits: 8388608,}
hmac_verify: verify HMAC for data
pub const IMPORT_WRAPPED: Capability
IMPORT_WRAPPED: Capability = Capability{bits: 8192,}
import_wrapped: import keywrapped objects
pub const OTP_AEAD_CREATE: Capability
OTP_AEAD_CREATE: Capability = Capability{bits: 1073741824,}
otp_aead_create: create an OTP AEAD
pub const OTP_AEAD_RANDOM: Capability
OTP_AEAD_RANDOM: Capability = Capability{bits: 2147483648,}
otp_aead_random: create an OTP AEAD from random data
pub const OTP_AEAD_REWRAP_FROM: Capability
OTP_AEAD_REWRAP_FROM: Capability = Capability{bits: 4294967296,}
otp_aead_rewrap_from: rewrap AEADs from one OTPAEADKey Object to another
pub const OTP_AEAD_REWRAP_TO: Capability
OTP_AEAD_REWRAP_TO: Capability = Capability{bits: 8589934592,}
otp_aead_rewrap_to: rewrap AEADs to one OTPAEADKey Object from another
pub const OTP_DECRYPT: Capability
OTP_DECRYPT: Capability = Capability{bits: 536870912,}
otp_decrypt: decrypt OTP
pub const PUT_ASYMMETRIC: Capability
PUT_ASYMMETRIC: Capability = Capability{bits: 8,}
put_asymmetric_key: write asymmetric objects
pub const PUT_AUTHKEY: Capability
PUT_AUTHKEY: Capability = Capability{bits: 4,}
put_auth_key: write AuthKey objects
pub const PUT_HMACKEY: Capability
PUT_HMACKEY: Capability = Capability{bits: 1048576,}
put_hmac_key: write HMACKey objects
pub const PUT_OPAQUE: Capability
PUT_OPAQUE: Capability = Capability{bits: 2,}
put_opaque: Write Opaque Objects
pub const PUT_OPTION: Capability
PUT_OPTION: Capability = Capability{bits: 131072,}
put_option: write device-global options
pub const PUT_OTP_AEAD_KEY: Capability
PUT_OTP_AEAD_KEY: Capability = Capability{bits: 34359738368,}
put_otp_aead_key: write OTPAEADKey objects
pub const PUT_TEMPLATE: Capability
PUT_TEMPLATE: Capability = Capability{bits: 134217728,}
put_template: write template objects
pub const PUT_WRAPKEY: Capability
PUT_WRAPKEY: Capability = Capability{bits: 16384,}
put_wrapkey: write WrapKey objects
pub const RESET: Capability
RESET: Capability = Capability{bits: 268435456,}
reset: factory reset the device
pub const SSH_CERTIFY: Capability
SSH_CERTIFY: Capability = Capability{bits: 33554432,}
ssh_certify: sign SSH certificates
pub const UNWRAP_DATA: Capability
UNWRAP_DATA: Capability = Capability{bits: 274877906944,}
unwrap_data: unwrap user-provided data
pub const WRAP_DATA: Capability
WRAP_DATA: Capability = Capability{bits: 137438953472,}
wrap_data: wrap user-provided data
pub const CAP46: Capability
CAP46: Capability = Capability{bits: 70368744177664,}
Unknown Capability (Bit 46)
pub const CAP47: Capability
CAP47: Capability = Capability{bits: 140737488355328,}
Unknown Capability (Bit 47)
pub const CAP48: Capability
CAP48: Capability = Capability{bits: 281474976710656,}
Unknown Capability (Bit 48)
pub const CAP49: Capability
CAP49: Capability = Capability{bits: 562949953421312,}
Unknown Capability (Bit 49)
pub const CAP50: Capability
CAP50: Capability = Capability{bits: 1125899906842624,}
Unknown Capability (Bit 50)
pub const CAP51: Capability
CAP51: Capability = Capability{bits: 2251799813685248,}
Unknown Capability (Bit 51)
pub const CAP52: Capability
CAP52: Capability = Capability{bits: 4503599627370496,}
Unknown Capability (Bit 52)
pub const CAP53: Capability
CAP53: Capability = Capability{bits: 9007199254740992,}
Unknown Capability (Bit 53)
pub const CAP54: Capability
CAP54: Capability = Capability{bits: 18014398509481984,}
Unknown Capability (Bit 54)
pub const CAP55: Capability
CAP55: Capability = Capability{bits: 36028797018963968,}
Unknown Capability (Bit 55)
pub const CAP56: Capability
CAP56: Capability = Capability{bits: 72057594037927936,}
Unknown Capability (Bit 56)
pub const CAP57: Capability
CAP57: Capability = Capability{bits: 144115188075855872,}
Unknown Capability (Bit 57)
pub const CAP58: Capability
CAP58: Capability = Capability{bits: 288230376151711744,}
Unknown Capability (Bit 58)
pub const CAP59: Capability
CAP59: Capability = Capability{bits: 576460752303423488,}
Unknown Capability (Bit 59)
pub const CAP60: Capability
CAP60: Capability = Capability{bits: 1152921504606846976,}
Unknown Capability (Bit 60)
pub const CAP61: Capability
CAP61: Capability = Capability{bits: 2305843009213693952,}
Unknown Capability (Bit 61)
pub const CAP62: Capability
CAP62: Capability = Capability{bits: 4611686018427387904,}
Unknown Capability (Bit 62)
pub const CAP63: Capability
CAP63: Capability = Capability{bits: 9223372036854775808,}
Unknown Capability (Bit 63)
pub fn empty() -> Capability
pub fn empty() -> Capability
Returns an empty set of flags.
pub fn all() -> Capability
pub fn all() -> Capability
Returns the set containing all flags.
pub fn bits(&self) -> u64
pub fn bits(&self) -> u64
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u64) -> Option<Capability>
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
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
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: Capability) -> bool
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
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)
pub fn insert(&mut self, other: Capability)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: Capability)
pub fn remove(&mut self, other: Capability)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: Capability)
pub fn toggle(&mut self, other: Capability)
Toggles the specified flags in-place.
pub fn set(&mut self, other: Capability, value: bool)
pub fn set(&mut self, other: Capability, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for Capability
impl Copy for Capability
impl PartialEq for Capability
impl PartialEq for Capability
fn eq(&self, other: &Capability) -> bool
fn eq(&self, other: &Capability) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Capability) -> bool
fn ne(&self, other: &Capability) -> bool
This method tests for !=
.
impl Eq for Capability
impl Eq for Capability
impl Clone for Capability
impl Clone for Capability
fn clone(&self) -> Capability
fn clone(&self) -> Capability
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialOrd for Capability
impl PartialOrd for Capability
fn partial_cmp(&self, other: &Capability) -> Option<Ordering>
fn partial_cmp(&self, other: &Capability) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Capability) -> bool
fn lt(&self, other: &Capability) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Capability) -> bool
fn le(&self, other: &Capability) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Capability) -> bool
fn gt(&self, other: &Capability) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Capability) -> bool
fn ge(&self, other: &Capability) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Capability
impl Ord for Capability
fn cmp(&self, other: &Capability) -> Ordering
fn cmp(&self, other: &Capability) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for Capability
impl Hash for Capability
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Capability
impl Debug for Capability
impl Binary for Capability
impl Binary for Capability
impl Octal for Capability
impl Octal for Capability
impl LowerHex for Capability
impl LowerHex for Capability
impl UpperHex for Capability
impl UpperHex for Capability
impl BitOr for Capability
impl BitOr for Capability
type Output = Capability
The resulting type after applying the |
operator.
fn bitor(self, other: Capability) -> Capability
fn bitor(self, other: Capability) -> Capability
Returns the union of the two sets of flags.
impl BitOrAssign for Capability
impl BitOrAssign for Capability
fn bitor_assign(&mut self, other: Capability)
fn bitor_assign(&mut self, other: Capability)
Adds the set of flags.
impl BitXor for Capability
impl BitXor for Capability
type Output = Capability
The resulting type after applying the ^
operator.
fn bitxor(self, other: Capability) -> Capability
fn bitxor(self, other: Capability) -> Capability
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for Capability
impl BitXorAssign for Capability
fn bitxor_assign(&mut self, other: Capability)
fn bitxor_assign(&mut self, other: Capability)
Toggles the set of flags.
impl BitAnd for Capability
impl BitAnd for Capability
type Output = Capability
The resulting type after applying the &
operator.
fn bitand(self, other: Capability) -> Capability
fn bitand(self, other: Capability) -> Capability
Returns the intersection between the two sets of flags.
impl BitAndAssign for Capability
impl BitAndAssign for Capability
fn bitand_assign(&mut self, other: Capability)
fn bitand_assign(&mut self, other: Capability)
Disables all flags disabled in the set.
impl Sub for Capability
impl Sub for Capability
type Output = Capability
The resulting type after applying the -
operator.
fn sub(self, other: Capability) -> Capability
fn sub(self, other: Capability) -> Capability
Returns the set difference of the two sets of flags.
impl SubAssign for Capability
impl SubAssign for Capability
fn sub_assign(&mut self, other: Capability)
fn sub_assign(&mut self, other: Capability)
Disables all flags enabled in the set.
impl Not for Capability
impl Not for Capability
type Output = Capability
The resulting type after applying the !
operator.
fn not(self) -> Capability
fn not(self) -> Capability
Returns the complement of this set of flags.
impl Extend<Capability> for Capability
impl Extend<Capability> for Capability
fn extend<T: IntoIterator<Item = Capability>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Capability>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<Capability> for Capability
impl FromIterator<Capability> for Capability
fn from_iter<T: IntoIterator<Item = Capability>>(iterator: T) -> Capability
fn from_iter<T: IntoIterator<Item = Capability>>(iterator: T) -> Capability
Creates a value from an iterator. Read more
impl Default for Capability
[src]
impl Default for Capability
impl Serialize for Capability
[src]
impl Serialize for Capability
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for Capability
[src]
impl<'de> Deserialize<'de> for Capability
fn deserialize<D>(deserializer: D) -> Result<Capability, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Capability, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl Send for Capability
impl Send for Capability
impl Sync for Capability
impl Sync for Capability