#[non_exhaustive]
pub enum Attribute {
Show 59 variants AcIssuer(Vec<u8>), AllowedMechanisms(Vec<MechanismType>), AlwaysAuthenticate(bool), AlwaysSensitive(bool), Application(Vec<u8>), AttrTypes(Vec<u8>), Base(Vec<u8>), CertificateType(CertificateType), CheckValue(Vec<u8>), Class(ObjectClass), Coefficient(Vec<u8>), Copyable(bool), Decrypt(bool), Derive(bool), Destroyable(bool), EcParams(Vec<u8>), EcPoint(Vec<u8>), Encrypt(bool), EndDate(Date), Exponent1(Vec<u8>), Exponent2(Vec<u8>), Extractable(bool), HashOfIssuerPublicKey(Vec<u8>), HashOfSubjectPublicKey(Vec<u8>), Id(Vec<u8>), Issuer(Vec<u8>), KeyGenMechanism(MechanismType), KeyType(KeyType), Label(Vec<u8>), Local(bool), Modifiable(bool), Modulus(Vec<u8>), ModulusBits(Ulong), NeverExtractable(bool), ObjectId(Vec<u8>), Owner(Vec<u8>), Prime(Vec<u8>), Prime1(Vec<u8>), Prime2(Vec<u8>), Private(bool), PrivateExponent(Vec<u8>), PublicExponent(Vec<u8>), PublicKeyInfo(Vec<u8>), Sensitive(bool), SerialNumber(Vec<u8>), Sign(bool), SignRecover(bool), StartDate(Date), Subject(Vec<u8>), Token(bool), Trusted(bool), Unwrap(bool), Url(Vec<u8>), Value(Vec<u8>), ValueLen(Ulong), Verify(bool), VerifyRecover(bool), Wrap(bool), WrapWithTrusted(bool),
}
Expand description

Attribute value

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AcIssuer(Vec<u8>)

DER-encoding of the attribute certificate’s issuer

§

AllowedMechanisms(Vec<MechanismType>)

List of mechanisms allowed to be used with the key

§

AlwaysAuthenticate(bool)

Indicates that the user has to supply the PIN for each use with the key

§

AlwaysSensitive(bool)

Indicates if the key has always had the Sensitive attribute set to true

§

Application(Vec<u8>)

Description of the application that manages the object

§

AttrTypes(Vec<u8>)

BER-encoding of a sequence of object identifier values

§

Base(Vec<u8>)

Base number value of a key

§

CertificateType(CertificateType)

Type of certificate

§

CheckValue(Vec<u8>)

Checksum

§

Class(ObjectClass)

Type of an object

§

Coefficient(Vec<u8>)

The CRT coefficient iqmp of an RSA private key

§

Copyable(bool)

Determines if an object can be copied

§

Decrypt(bool)

Determines if a key supports decryption

§

Derive(bool)

Determines if it is possible to derive other keys from the key

§

Destroyable(bool)

Determines if it is possible to destroy an object

§

EcParams(Vec<u8>)

Parameters describing an elliptic curve

§

EcPoint(Vec<u8>)

Elliptic Curve point

§

Encrypt(bool)

Determines if a key supports encryption

§

EndDate(Date)

The end date of the object

§

Exponent1(Vec<u8>)

The private exponent dmp1 of an RSA private key

§

Exponent2(Vec<u8>)

The private exponent dmq1 of an RSA private key

§

Extractable(bool)

Determines if a key is extractable and can be wrapped

§

HashOfIssuerPublicKey(Vec<u8>)

Hash of issuer public key

§

HashOfSubjectPublicKey(Vec<u8>)

Hash of subject public key

§

Id(Vec<u8>)

Key identifier for key

§

Issuer(Vec<u8>)

DER-encoding of the certificate issuer name

§

KeyGenMechanism(MechanismType)

Identifier of the mechanism used to generate the key material

§

KeyType(KeyType)

Type of a key

§

Label(Vec<u8>)

Description of the object

§

Local(bool)

Indicates if the key was generated locally or copied from a locally created object

§

Modifiable(bool)

Determines if the object can be modified

§

Modulus(Vec<u8>)

Modulus value of a key

§

ModulusBits(Ulong)

Length in bits of the modulus of a key

§

NeverExtractable(bool)

Indicates if the key has never had the Extractable attribute set to true

§

ObjectId(Vec<u8>)

Object ID

§

Owner(Vec<u8>)

DER encoding of the attribute certificate’s subject field

§

Prime(Vec<u8>)

Prime number value of a key

§

Prime1(Vec<u8>)

The prime p of an RSA private key

§

Prime2(Vec<u8>)

The prime q of an RSA private key

§

Private(bool)

Determines if the object is private

§

PrivateExponent(Vec<u8>)

The private exponent d

§

PublicExponent(Vec<u8>)

Public exponent value of a key

§

PublicKeyInfo(Vec<u8>)

DER-encoding of the SubjectPublicKeyInfo

§

Sensitive(bool)

Determines if the key is sensitive

§

SerialNumber(Vec<u8>)

DER encoding of the certificate serial number

§

Sign(bool)

Determines if a key supports signing

§

SignRecover(bool)

Determines if a key supports signing where the data can be recovered from the signature

§

StartDate(Date)

The start date of the object

§

Subject(Vec<u8>)

DER-encoding of certificate subject name

§

Token(bool)

Determines if the object is a token object

§

Trusted(bool)

Determines if an object is trusted

§

Unwrap(bool)

Determines if a key supports unwrapping

§

Url(Vec<u8>)

Gives the URL where the complete certificate can ber obtained

§

Value(Vec<u8>)

Value of the object

§

ValueLen(Ulong)

Length in bytes of the value

§

Verify(bool)

Determines if a key supports verifying

§

VerifyRecover(bool)

Determines if a key supports verifying where the data can be recovered from the signature

§

Wrap(bool)

Determines if a key supports wrapping

§

WrapWithTrusted(bool)

Indicates that the key can only be wrapped with a wrapping key that has the Trusted attribute

Implementations§

source§

impl Attribute

source

pub fn attribute_type(&self) -> AttributeType

Get the type of an attribute

Trait Implementations§

source§

impl Clone for Attribute

source§

fn clone(&self) -> Attribute

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Attribute

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&Attribute> for CK_ATTRIBUTE

source§

fn from(attribute: &Attribute) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Attribute

source§

fn eq(&self, other: &Attribute) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<_CK_ATTRIBUTE> for Attribute

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(attribute: CK_ATTRIBUTE) -> Result<Self>

Performs the conversion.
source§

impl Eq for Attribute

source§

impl StructuralPartialEq for Attribute

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.