Struct breez_sdk_core::bitcoin::util::key::secp256k1::hashes::hmac::HmacEngine
pub struct HmacEngine<T>where
T: Hash,{ /* private fields */ }
Expand description
Pair of underyling hash engines, used for the inner and outer hash of HMAC.
Implementations§
§impl<T> HmacEngine<T>where
T: Hash,
impl<T> HmacEngine<T>where
T: Hash,
pub fn new(key: &[u8]) -> HmacEngine<T> ⓘ
pub fn new(key: &[u8]) -> HmacEngine<T> ⓘ
Constructs a new keyed HMAC from key
.
We only support underlying hashes whose block sizes are ≤ 128 bytes.
§Panics
Larger hashes will result in a panic.
pub fn from_inner_engines(
iengine: <T as Hash>::Engine,
oengine: <T as Hash>::Engine,
) -> HmacEngine<T> ⓘ
pub fn from_inner_engines( iengine: <T as Hash>::Engine, oengine: <T as Hash>::Engine, ) -> HmacEngine<T> ⓘ
A special constructor giving direct access to the underlying “inner” and “outer” engines.
Trait Implementations§
§impl<T> Clone for HmacEngine<T>
impl<T> Clone for HmacEngine<T>
§fn clone(&self) -> HmacEngine<T> ⓘ
fn clone(&self) -> HmacEngine<T> ⓘ
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl<T> Default for HmacEngine<T>where
T: Hash,
impl<T> Default for HmacEngine<T>where
T: Hash,
§fn default() -> HmacEngine<T> ⓘ
fn default() -> HmacEngine<T> ⓘ
Returns the “default value” for a type. Read more
§impl<T> HashEngine for HmacEngine<T>where
T: Hash,
impl<T> HashEngine for HmacEngine<T>where
T: Hash,
§type MidState = HmacMidState<T>
type MidState = HmacMidState<T>
Byte array representing the internal state of the hash engine.
§fn midstate(&self) -> <HmacEngine<T> as HashEngine>::MidState ⓘ
fn midstate(&self) -> <HmacEngine<T> as HashEngine>::MidState ⓘ
Outputs the midstate of the hash engine. This function should not be
used directly unless you really know what you’re doing.
§const BLOCK_SIZE: usize = <T::Engine>::BLOCK_SIZE
const BLOCK_SIZE: usize = <T::Engine>::BLOCK_SIZE
Length of the hash’s internal block size, in bytes.
§fn n_bytes_hashed(&self) -> usize
fn n_bytes_hashed(&self) -> usize
Return the number of bytes already n_bytes_hashed(inputted).
§impl<T> Write for HmacEngine<T>where
T: Hash,
impl<T> Write for HmacEngine<T>where
T: Hash,
§fn flush(&mut self) -> Result<(), Error>
fn flush(&mut self) -> Result<(), Error>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
§fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
Writes a buffer into this writer, returning how many bytes were written. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<T> Freeze for HmacEngine<T>
impl<T> RefUnwindSafe for HmacEngine<T>
impl<T> Send for HmacEngine<T>
impl<T> Sync for HmacEngine<T>
impl<T> Unpin for HmacEngine<T>
impl<T> UnwindSafe for HmacEngine<T>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request