Struct cryptoki::mechanism::MechanismInfo
source · pub struct MechanismInfo { /* private fields */ }
Expand description
Information about a particular mechanism
Implementations§
source§impl MechanismInfo
impl MechanismInfo
sourcepub fn min_key_size(&self) -> usize
pub fn min_key_size(&self) -> usize
The minimum size of the key for the mechanism
Conformance: Whether this is measured in bits or in bytes is mechanism-dependent. For some mechanisms, this field may be meaningless and take any value.
sourcepub fn max_key_size(&self) -> usize
pub fn max_key_size(&self) -> usize
The maximum size of the key for the mechanism
Conformance: Whether this is measured in bits or in bytes is mechanism-dependent For some mechanisms, this field may be meaningless and take any value.
sourcepub fn hardware(&self) -> bool
pub fn hardware(&self) -> bool
True if the mechanism is performed by the device; false if the mechanism is performed in software
sourcepub fn encrypt(&self) -> bool
pub fn encrypt(&self) -> bool
True if the mechanism can be used to encrypt data
See Session::encrypt
sourcepub fn decrypt(&self) -> bool
pub fn decrypt(&self) -> bool
True if the mechanism can be used to decrypt encrypted data
See Session::decrypt
sourcepub fn sign(&self) -> bool
pub fn sign(&self) -> bool
True if the mechanism can be used to digitally sign data
See Session::sign
sourcepub fn sign_recover(&self) -> bool
pub fn sign_recover(&self) -> bool
True if the mechanism can be used to digitally data which can be recovered from the signature
sourcepub fn verify(&self) -> bool
pub fn verify(&self) -> bool
True if the mechanism can be used to verify a digital signature
See Session::verify
sourcepub fn verify_recover(&self) -> bool
pub fn verify_recover(&self) -> bool
True if the mechanism can be used to verify a digital signature and recover the signed data
sourcepub fn generate_key_pair(&self) -> bool
pub fn generate_key_pair(&self) -> bool
True if the mechanism can be used to generate a public/private key pair
sourcepub fn extension(&self) -> bool
pub fn extension(&self) -> bool
True if there is an extension to the flags; false if no extensions
Conformance: This must be false for PKCS#11 v2.40
sourcepub fn ec_f_p(&self) -> bool
pub fn ec_f_p(&self) -> bool
True if the mechanism can be used to with elliptic curve domain parameters over Fp
Conformance:
At least one of ec_f_p
and
ec_f_2m
must be true
sourcepub fn ec_f_2m(&self) -> bool
pub fn ec_f_2m(&self) -> bool
True if the mechanism can be used with elliptic curve domain parameters over F2m
Conformance:
At least one of ec_f_p
and
ec_f_2m
must be true
sourcepub fn ec_from_parameters(&self) -> bool
pub fn ec_from_parameters(&self) -> bool
True if the mechanism supports specifying elliptic curve domain parameters explicitly
Conformance:
At least one of ec_from_parameters
and
ec_from_named_curve
must be true
sourcepub fn ec_from_named_curve(&self) -> bool
pub fn ec_from_named_curve(&self) -> bool
True if the mechanism supports specifying elliptic curve domain parameters with a named curve
Conformance:
At least one of ec_from_parameters
and
ec_from_named_curve
must be true
sourcepub fn ec_uncompressed(&self) -> bool
pub fn ec_uncompressed(&self) -> bool
True if the mechanism can be used with elliptic curve points in uncompressed form
Conformance:
At least one of ec_uncompressed
and
ec_compressed
must be true
sourcepub fn ec_compressed(&self) -> bool
pub fn ec_compressed(&self) -> bool
True if the mechanism can be used with elliptic curve points in compressed form
Conformance:
At least one of ec_uncompressed
and
ec_compressed
must be true
Trait Implementations§
source§impl Clone for MechanismInfo
impl Clone for MechanismInfo
source§fn clone(&self) -> MechanismInfo
fn clone(&self) -> MechanismInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more