Struct jws::hmac::HmacVerifier
source · [−]Expand description
Message verifier that supports the HMAC-SHA-256, HMAC-SHA-384 and HMAC-SHA-512 algorithms using rust-crypto
.
The wrapped key type may be anything that implements AsRef<[u8]>
.
You can use a Vec<u8>
to have the verifier own the key,
or a &[u8]
to prevent copying the key more than necessary.
Implementations
Trait Implementations
sourceimpl<Key: Clone + AsRef<[u8]>> Clone for HmacVerifier<Key>
impl<Key: Clone + AsRef<[u8]>> Clone for HmacVerifier<Key>
sourcefn clone(&self) -> HmacVerifier<Key>
fn clone(&self) -> HmacVerifier<Key>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<K: AsRef<[u8]>> Verifier for HmacVerifier<K>
impl<K: AsRef<[u8]>> Verifier for HmacVerifier<K>
sourcefn verify(
&self,
protected_header: Option<&JsonObject>,
unprotected_header: Option<&JsonObject>,
encoded_header: &[u8],
encoded_payload: &[u8],
signature: &[u8]
) -> Result<()>
fn verify(
&self,
protected_header: Option<&JsonObject>,
unprotected_header: Option<&JsonObject>,
encoded_header: &[u8],
encoded_payload: &[u8],
signature: &[u8]
) -> Result<()>
Verify the signature of a JWS message. Read more
Auto Trait Implementations
impl<Key> RefUnwindSafe for HmacVerifier<Key> where
Key: RefUnwindSafe,
impl<Key> Send for HmacVerifier<Key> where
Key: Send,
impl<Key> Sync for HmacVerifier<Key> where
Key: Sync,
impl<Key> Unpin for HmacVerifier<Key> where
Key: Unpin,
impl<Key> UnwindSafe for HmacVerifier<Key> where
Key: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more