pub enum Digest {
Sha256,
Sha1,
}Expand description
The hash an HMAC scheme runs on. SHA-256 everywhere it is not otherwise
named; SHA-1 only where a provider signs with it (Vercel).
SHA-1 is safe in this position because HMAC is a MAC: its security depends on the secret key and the hash’s PRF behaviour, not on collision resistance. It is not collision-sensitive use.
Variants§
Sha256
HMAC-SHA256 — the default, and every scheme before Vercel.
Sha1
HMAC-SHA1 — Vercel’s x-vercel-signature.
Trait Implementations§
impl Copy for Digest
impl Eq for Digest
impl StructuralPartialEq for Digest
Auto Trait Implementations§
impl Freeze for Digest
impl RefUnwindSafe for Digest
impl Send for Digest
impl Sync for Digest
impl Unpin for Digest
impl UnsafeUnpin for Digest
impl UnwindSafe for Digest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.