#[non_exhaustive]pub enum HashAlgorithm {
Md5,
Sha256,
Sha1,
Sha224,
Sha384,
Sha512,
}Expand description
Algorithms accepted by crate::RTCCrypto::hash.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Md5
MD5, retained only for STUN long-term credential derivation.
Sha256
SHA-256.
Sha1
SHA-1, only to verify a certificate fingerprint a peer gives with no stronger hash (RFC 8122 section 5).
Sha224
SHA-224 (certificate fingerprints, RFC 8122 section 5).
Sha384
SHA-384 (certificate fingerprints, RFC 8122 section 5).
Sha512
SHA-512 (certificate fingerprints, RFC 8122 section 5).
Implementations§
Source§impl HashAlgorithm
impl HashAlgorithm
Sourcepub const fn output_len(self) -> usize
pub const fn output_len(self) -> usize
Returns the digest length in bytes.
Trait Implementations§
Source§impl Clone for HashAlgorithm
impl Clone for HashAlgorithm
impl Copy for HashAlgorithm
Source§impl Debug for HashAlgorithm
impl Debug for HashAlgorithm
impl Eq for HashAlgorithm
Source§impl Hash for HashAlgorithm
impl Hash for HashAlgorithm
Source§impl PartialEq for HashAlgorithm
impl PartialEq for HashAlgorithm
impl StructuralPartialEq for HashAlgorithm
Auto Trait Implementations§
impl Forget for HashAlgorithm
impl Freeze for HashAlgorithm
impl Move for HashAlgorithm
impl RefUnwindSafe for HashAlgorithm
impl Send for HashAlgorithm
impl Sync for HashAlgorithm
impl Unpin for HashAlgorithm
impl UnsafeUnpin for HashAlgorithm
impl UnwindSafe for HashAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more