[][src]Struct parsec_interface::operations::psa_key_attributes::KeyAttributes

pub struct KeyAttributes {
    pub key_type: KeyType,
    pub key_bits: u32,
    pub key_policy: KeyPolicy,
}

Native definition of the attributes needed to fully describe a cryptographic key.

Fields

key_type: KeyType

Intrinsic category and type of a key

key_bits: u32

Size of a key in bits

key_policy: KeyPolicy

Policy restricting the permitted usage of the key

Methods

impl KeyAttributes[src]

pub fn is_exportable(self) -> bool[src]

Check if a key has permission to be exported

pub fn can_export(self) -> Result<()>[src]

Check export in a faillible way

pub fn is_hash_signable(self) -> bool[src]

Check if a key has permission to sign a message hash

pub fn can_sign_hash(self) -> Result<()>[src]

Check hash signing permission in a faillible way

pub fn is_hash_verifiable(self) -> bool[src]

Check if a key has permission to verify a message hash

pub fn can_verify_hash(self) -> Result<()>[src]

Check hash signing permission in a faillible way

pub fn is_alg_permitted(self, alg: Algorithm) -> bool[src]

Check if the alg given for a cryptographic operation is permitted to be used with the key

pub fn permits_alg(self, alg: Algorithm) -> Result<()>[src]

Check if alg is permitted in a faillible way

pub fn is_compatible_with_alg(self, alg: Algorithm) -> bool[src]

Check if the alg given for a cryptographic operation is compatible with the type of the key

pub fn compatible_with_alg(self, alg: Algorithm) -> Result<()>[src]

Check if alg is compatible in a faillible way

Trait Implementations

impl Clone for KeyAttributes[src]

impl Copy for KeyAttributes[src]

impl Debug for KeyAttributes[src]

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

impl PartialEq<KeyAttributes> for KeyAttributes[src]

impl Serialize for KeyAttributes[src]

impl StructuralPartialEq for KeyAttributes[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.