Enum pretty_good::HashAlgorithm
[−]
[src]
#[repr(u8)]pub enum HashAlgorithm { Md5, Sha1, Ripemd160, Sha256, Sha384, Sha512, Sha224, Unknown, }
Type for hash algorithms supported by OpenPGP.
Variants
Md5
Sha1
Ripemd160
Sha256
Sha384
Sha512
Sha224
Unknown
Methods
impl HashAlgorithm
[src]
pub fn asn1_oid(&self) -> Result<ObjectIdentifier, Error>
[src]
pub fn hash<T: AsRef<[u8]>>(&self, contents: T) -> Result<Vec<u8>, Error>
[src]
Trait Implementations
impl Clone for HashAlgorithm
[src]
fn clone(&self) -> HashAlgorithm
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for HashAlgorithm
[src]
impl Debug for HashAlgorithm
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for HashAlgorithm
[src]
fn eq(&self, __arg_0: &HashAlgorithm) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for HashAlgorithm
[src]
impl From<u8> for HashAlgorithm
[src]
fn from(val: u8) -> HashAlgorithm
[src]
Performs the conversion.
impl From<HashAlgorithm> for u8
[src]
fn from(val: HashAlgorithm) -> u8
[src]
Performs the conversion.