[−][src]Enum parsec_interface::operations::psa_algorithm::AsymmetricSignature
Enumeration of asymmetric signing algorithms supported.
Variants
RSA PKCS#1 v1.5 signature with hashing.
Fields of RsaPkcs1v15Sign
hash_alg: SignHash
A hash algorithm to use.
Raw PKCS#1 v1.5 signature.
RSA PSS signature with hashing.
Fields of RsaPss
hash_alg: SignHash
A hash algorithm to use.
ECDSA signature with hashing.
Fields of Ecdsa
hash_alg: SignHash
A hash algorithm to use.
ECDSA signature without hashing.
Deterministic ECDSA signature with hashing.
Fields of DeterministicEcdsa
hash_alg: SignHash
A hash algorithm to use.
Implementations
impl AsymmetricSignature
[src]
pub fn is_alg_permitted(self, alg: AsymmetricSignature) -> bool
[src]
Check if the alg given for a cryptographic operation is permitted to be used with this algorithm as a policy
Example
use psa_crypto::types::algorithm::{AsymmetricSignature, SignHash, Hash}; assert!(AsymmetricSignature::RsaPkcs1v15Sign { hash_alg: SignHash::Any } .is_alg_permitted(AsymmetricSignature::RsaPkcs1v15Sign { hash_alg: SignHash::Specific(Hash::Sha1) }) ); assert!(!AsymmetricSignature::RsaPkcs1v15Sign { hash_alg: SignHash::Specific(Hash::Sha256) } .is_alg_permitted(AsymmetricSignature::RsaPkcs1v15Sign { hash_alg: SignHash::Specific(Hash::Sha1) }) );
pub fn is_rsa_alg(self) -> bool
[src]
Check if this is a RSA algorithm
pub fn is_ecc_alg(self) -> bool
[src]
Check if this is an ECC algorithm
pub fn is_hash_len_permitted(self, hash_len: usize) -> bool
[src]
Determines if the given hash length is compatible with the asymmetric signature scheme
Trait Implementations
impl Clone for AsymmetricSignature
[src]
pub fn clone(&self) -> AsymmetricSignature
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for AsymmetricSignature
[src]
impl Debug for AsymmetricSignature
[src]
impl<'de> Deserialize<'de> for AsymmetricSignature
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<AsymmetricSignature, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<AsymmetricSignature, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl From<AsymmetricSignature> for Algorithm
[src]
pub fn from(alg: AsymmetricSignature) -> Algorithm
[src]
impl PartialEq<AsymmetricSignature> for AsymmetricSignature
[src]
pub fn eq(&self, other: &AsymmetricSignature) -> bool
[src]
pub fn ne(&self, other: &AsymmetricSignature) -> bool
[src]
impl Serialize for AsymmetricSignature
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralPartialEq for AsymmetricSignature
[src]
impl Zeroize for AsymmetricSignature
[src]
Auto Trait Implementations
impl RefUnwindSafe for AsymmetricSignature
[src]
impl Send for AsymmetricSignature
[src]
impl Sync for AsymmetricSignature
[src]
impl Unpin for AsymmetricSignature
[src]
impl UnwindSafe for AsymmetricSignature
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,