[−][src]Struct bitcoin_hashes::hmac::HmacEngine
Pair of underyling hash engines, used for the inner and outer hash of HMAC
Methods
impl<T: HashTrait> HmacEngine<T>
[src]
pub fn new(key: &[u8]) -> HmacEngine<T>
[src]
Construct a new keyed HMAC with the given key. We only support underlying hashes whose block sizes are ≤ 128 bytes; larger hashes will result in panics.
pub fn from_inner_engines(
iengine: T::Engine,
oengine: T::Engine
) -> HmacEngine<T>
[src]
iengine: T::Engine,
oengine: T::Engine
) -> HmacEngine<T>
A special constructor giving direct access to the underlying "inner" and "outer" engines.
Trait Implementations
impl<T: HashTrait> HashEngine for HmacEngine<T>
[src]
type MidState = HmacMidState<T>
Byte array representing the internal state of the hash engine
fn midstate(&self) -> Self::MidState
[src]
const BLOCK_SIZE: usize
[src]
fn n_bytes_hashed(&self) -> usize
[src]
fn input(&mut self, buf: &[u8])
[src]
impl<T: HashTrait> Default for HmacEngine<T>
[src]
impl<T: Clone + HashTrait> Clone for HmacEngine<T> where
T::Engine: Clone,
T::Engine: Clone,
[src]
T::Engine: Clone,
T::Engine: Clone,
fn clone(&self) -> HmacEngine<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<T> Unpin for HmacEngine<T> where
<T as Hash>::Engine: Unpin,
<T as Hash>::Engine: Unpin,
impl<T> Sync for HmacEngine<T> where
<T as Hash>::Engine: Sync,
<T as Hash>::Engine: Sync,
impl<T> Send for HmacEngine<T> where
<T as Hash>::Engine: Send,
<T as Hash>::Engine: Send,
impl<T> UnwindSafe for HmacEngine<T> where
<T as Hash>::Engine: UnwindSafe,
<T as Hash>::Engine: UnwindSafe,
impl<T> RefUnwindSafe for HmacEngine<T> where
<T as Hash>::Engine: RefUnwindSafe,
<T as Hash>::Engine: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,