Enum parsec_interface::operations::psa_algorithm::SignHash
source · [−]pub enum SignHash {
Specific(Hash),
Any,
}
Expand description
Enumeration of hash algorithms used in “hash-and-sign” algorithms.
Variants
Specific(Hash)
A specific hash algorithm to choose.
Any
In a hash-and-sign algorithm policy, allow any hash algorithm. This value must not be used to build an algorithm specification to perform an operation. It is only valid to build policies, for signature algorithms.
Implementations
sourceimpl SignHash
impl SignHash
sourcepub fn is_alg_permitted(self, alg: SignHash) -> bool
pub fn is_alg_permitted(self, alg: SignHash) -> bool
Check if the alg given for a cryptographic operation is permitted to be used with this algorithm as a policy
Trait Implementations
sourceimpl<'de> Deserialize<'de> for SignHash
impl<'de> Deserialize<'de> for SignHash
sourcepub fn deserialize<__D>(
__deserializer: __D
) -> Result<SignHash, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<SignHash, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for SignHash
impl Serialize for SignHash
sourcepub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for SignHash
impl StructuralPartialEq for SignHash
Auto Trait Implementations
impl RefUnwindSafe for SignHash
impl Send for SignHash
impl Sync for SignHash
impl Unpin for SignHash
impl UnwindSafe for SignHash
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more