pub trait Verification {
// Required methods
fn hmac_for_offer_payment(
&self,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Hmac<Sha256>;
fn verify_for_offer_payment(
&self,
hmac: Hmac<Sha256>,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Result<(), ()>;
}Expand description
A trait defining behavior for creating and verifing the HMAC for authenticating a given data.
Required Methods§
Sourcefn hmac_for_offer_payment(
&self,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Hmac<Sha256>
fn hmac_for_offer_payment( &self, nonce: Nonce, expanded_key: &ExpandedKey, ) -> Hmac<Sha256>
Constructs an HMAC to include in OffersContext for the data along with the given
Nonce.
Sourcefn verify_for_offer_payment(
&self,
hmac: Hmac<Sha256>,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Result<(), ()>
fn verify_for_offer_payment( &self, hmac: Hmac<Sha256>, nonce: Nonce, expanded_key: &ExpandedKey, ) -> Result<(), ()>
Authenticates the data using an HMAC and a Nonce taken from an OffersContext.
Implementations on Foreign Types§
Source§impl Verification for PaymentHash
impl Verification for PaymentHash
Source§fn hmac_for_offer_payment(
&self,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Hmac<Sha256>
fn hmac_for_offer_payment( &self, nonce: Nonce, expanded_key: &ExpandedKey, ) -> Hmac<Sha256>
Constructs an HMAC to include in OffersContext::InboundPayment for the payment hash
along with the given Nonce.
Source§fn verify_for_offer_payment(
&self,
hmac: Hmac<Sha256>,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Result<(), ()>
fn verify_for_offer_payment( &self, hmac: Hmac<Sha256>, nonce: Nonce, expanded_key: &ExpandedKey, ) -> Result<(), ()>
Authenticates the payment id using an HMAC and a Nonce taken from an
OffersContext::InboundPayment.