Struct bitcoin_hashes::hmac::Hmac
source · #[repr(transparent)]pub struct Hmac<T: Hash>(_);
Expand description
A hash computed from a RFC 2104 HMAC. Parameterized by the underlying hash function.
Trait Implementations§
source§impl<'de, T: Hash + Deserialize<'de>> Deserialize<'de> for Hmac<T>
Available on crate feature serde
only.
impl<'de, T: Hash + Deserialize<'de>> Deserialize<'de> for Hmac<T>
Available on crate feature
serde
only.source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Hmac<T>, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Hmac<T>, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: Hash> Hash for Hmac<T>
impl<T: Hash> Hash for Hmac<T>
§type Engine = HmacEngine<T>
type Engine = HmacEngine<T>
A hashing engine which bytes can be serialized into. It is expected
to implement the
io::Write
trait, and to never return errors under
any conditions.source§fn from_engine(e: HmacEngine<T>) -> Hmac<T>
fn from_engine(e: HmacEngine<T>) -> Hmac<T>
Produces a hash from the current state of a given engine.
source§fn to_byte_array(self) -> Self::Bytes
fn to_byte_array(self) -> Self::Bytes
Returns the underlying byte array.
source§fn as_byte_array(&self) -> &Self::Bytes
fn as_byte_array(&self) -> &Self::Bytes
Returns a reference to the underlying byte array.
source§fn from_byte_array(bytes: T::Bytes) -> Self
fn from_byte_array(bytes: T::Bytes) -> Self
Constructs a hash from the underlying byte array.
source§const DISPLAY_BACKWARD: bool = false
const DISPLAY_BACKWARD: bool = false
Flag indicating whether user-visible serializations of this hash
should be backward. For some reason Satoshi decided this should be
true for
Sha256dHash
, so here we are.source§impl<T: Hash + JsonSchema> JsonSchema for Hmac<T>
impl<T: Hash + JsonSchema> JsonSchema for Hmac<T>
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§impl<T: Ord + Hash> Ord for Hmac<T>
impl<T: Ord + Hash> Ord for Hmac<T>
source§impl<T: PartialEq + Hash> PartialEq<Hmac<T>> for Hmac<T>
impl<T: PartialEq + Hash> PartialEq<Hmac<T>> for Hmac<T>
source§impl<T: PartialOrd + Hash> PartialOrd<Hmac<T>> for Hmac<T>
impl<T: PartialOrd + Hash> PartialOrd<Hmac<T>> for Hmac<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more