Struct breez_sdk_liquid::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<'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> 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
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
§impl<W> WriteBytesExt for W
impl<W> WriteBytesExt for W
§fn write_u8(&mut self, n: u8) -> Result<(), Error>
fn write_u8(&mut self, n: u8) -> Result<(), Error>
Writes an unsigned 8 bit integer to the underlying writer. Read more
§fn write_i8(&mut self, n: i8) -> Result<(), Error>
fn write_i8(&mut self, n: i8) -> Result<(), Error>
Writes a signed 8 bit integer to the underlying writer. Read more
§fn write_u16<T>(&mut self, n: u16) -> Result<(), Error>where
T: ByteOrder,
fn write_u16<T>(&mut self, n: u16) -> Result<(), Error>where
T: ByteOrder,
Writes an unsigned 16 bit integer to the underlying writer. Read more
§fn write_i16<T>(&mut self, n: i16) -> Result<(), Error>where
T: ByteOrder,
fn write_i16<T>(&mut self, n: i16) -> Result<(), Error>where
T: ByteOrder,
Writes a signed 16 bit integer to the underlying writer. Read more
§fn write_u24<T>(&mut self, n: u32) -> Result<(), Error>where
T: ByteOrder,
fn write_u24<T>(&mut self, n: u32) -> Result<(), Error>where
T: ByteOrder,
Writes an unsigned 24 bit integer to the underlying writer. Read more
§fn write_i24<T>(&mut self, n: i32) -> Result<(), Error>where
T: ByteOrder,
fn write_i24<T>(&mut self, n: i32) -> Result<(), Error>where
T: ByteOrder,
Writes a signed 24 bit integer to the underlying writer. Read more
§fn write_u32<T>(&mut self, n: u32) -> Result<(), Error>where
T: ByteOrder,
fn write_u32<T>(&mut self, n: u32) -> Result<(), Error>where
T: ByteOrder,
Writes an unsigned 32 bit integer to the underlying writer. Read more
§fn write_i32<T>(&mut self, n: i32) -> Result<(), Error>where
T: ByteOrder,
fn write_i32<T>(&mut self, n: i32) -> Result<(), Error>where
T: ByteOrder,
Writes a signed 32 bit integer to the underlying writer. Read more
§fn write_u48<T>(&mut self, n: u64) -> Result<(), Error>where
T: ByteOrder,
fn write_u48<T>(&mut self, n: u64) -> Result<(), Error>where
T: ByteOrder,
Writes an unsigned 48 bit integer to the underlying writer. Read more
§fn write_i48<T>(&mut self, n: i64) -> Result<(), Error>where
T: ByteOrder,
fn write_i48<T>(&mut self, n: i64) -> Result<(), Error>where
T: ByteOrder,
Writes a signed 48 bit integer to the underlying writer. Read more
§fn write_u64<T>(&mut self, n: u64) -> Result<(), Error>where
T: ByteOrder,
fn write_u64<T>(&mut self, n: u64) -> Result<(), Error>where
T: ByteOrder,
Writes an unsigned 64 bit integer to the underlying writer. Read more
§fn write_i64<T>(&mut self, n: i64) -> Result<(), Error>where
T: ByteOrder,
fn write_i64<T>(&mut self, n: i64) -> Result<(), Error>where
T: ByteOrder,
Writes a signed 64 bit integer to the underlying writer. Read more
§fn write_u128<T>(&mut self, n: u128) -> Result<(), Error>where
T: ByteOrder,
fn write_u128<T>(&mut self, n: u128) -> Result<(), Error>where
T: ByteOrder,
Writes an unsigned 128 bit integer to the underlying writer.
§fn write_i128<T>(&mut self, n: i128) -> Result<(), Error>where
T: ByteOrder,
fn write_i128<T>(&mut self, n: i128) -> Result<(), Error>where
T: ByteOrder,
Writes a signed 128 bit integer to the underlying writer.
§fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error>where
T: ByteOrder,
fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error>where
T: ByteOrder,
Writes an unsigned n-bytes integer to the underlying writer. Read more
§fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error>where
T: ByteOrder,
fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error>where
T: ByteOrder,
Writes a signed n-bytes integer to the underlying writer. Read more
§fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error>where
T: ByteOrder,
fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error>where
T: ByteOrder,
Writes an unsigned n-bytes integer to the underlying writer. Read more
§fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error>where
T: ByteOrder,
fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error>where
T: ByteOrder,
Writes a signed n-bytes integer to the underlying writer. Read more