[−][src]Enum asuran_core::repository::hmac::HMAC
Tag for the HMAC algorithim used by a particular Chunk
Variants
Methods
impl HMAC
[src]
pub fn mac(self, data: &[u8], key: &Key) -> Vec<u8>
[src]
Produces an HMAC tag using the section of the key material reserved for integrity verification.
Panics
Will panic if the user has selected an algorithm for which support has not been compiled in.
pub fn id(self, data: &[u8], key: &Key) -> Vec<u8>
[src]
Produces an HMAC tag using the section of the key material reserved for
ChunkID
generation.
Panics
Will panic if the user has selected an algorithm for which support has not been compiled in.
pub fn verify_hmac(self, input_mac: &[u8], data: &[u8], key: &Key) -> bool
[src]
Produces an HMAC for the supplied data, using the portion of the supplied key
reserved for integrity verification, and the algorithm specified by the variant
of self
, and verifies it against the supplied HMAC, using constant time
comparisons where possible.
Panics
Panics if the user has selected an algorithm for which support has not been compiled in.
Trait Implementations
impl Clone for HMAC
[src]
impl Copy for HMAC
[src]
impl Debug for HMAC
[src]
impl<'de> Deserialize<'de> for HMAC
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for HMAC
[src]
impl PartialEq<HMAC> for HMAC
[src]
impl Serialize for HMAC
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for HMAC
[src]
impl StructuralPartialEq for HMAC
[src]
Auto Trait Implementations
impl RefUnwindSafe for HMAC
impl Send for HMAC
impl Sync for HMAC
impl Unpin for HMAC
impl UnwindSafe for HMAC
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,