pub struct HmacVerificationKey { /* private fields */ }Expand description
Caller-owned HMAC verification key.
Policy-free VerifyingKey calls enforce crate::policy::HmacPolicy::default.
super::VerifyContext supplies its immutable operation policy through the
policy-aware hooks, so legacy truncation always requires an explicit opt-in.
Owned secret bytes are zeroized when the key is dropped.
Implementations§
Trait Implementations§
Source§impl Clone for HmacVerificationKey
impl Clone for HmacVerificationKey
Source§impl Debug for HmacVerificationKey
impl Debug for HmacVerificationKey
Source§impl VerifyingKey for HmacVerificationKey
impl VerifyingKey for HmacVerificationKey
Source§fn validate_policy(&self, policy: &VerificationPolicy) -> Result<(), DsigError>
fn validate_policy(&self, policy: &VerificationPolicy) -> Result<(), DsigError>
Validate this key against the operation’s immutable trust policy. Read more
Source§fn validate_signature_value(
&self,
algorithm: SignatureAlgorithm,
signature_value: &[u8],
) -> Result<bool, DsigError>
fn validate_signature_value( &self, algorithm: SignatureAlgorithm, signature_value: &[u8], ) -> Result<bool, DsigError>
Check that
signature_value has the wire framing required by the
declared algorithm and this key before provider dispatch. Read moreSource§fn validate_signature_value_with_policy(
&self,
policy: &VerificationPolicy,
algorithm: SignatureAlgorithm,
signature_value: &[u8],
) -> Result<bool, DsigError>
fn validate_signature_value_with_policy( &self, policy: &VerificationPolicy, algorithm: SignatureAlgorithm, signature_value: &[u8], ) -> Result<bool, DsigError>
Validate wire framing under the operation’s immutable compatibility policy. Read more
Source§fn verify(
&self,
algorithm: SignatureAlgorithm,
signed_data: &[u8],
signature_value: &[u8],
) -> Result<bool, DsigError>
fn verify( &self, algorithm: SignatureAlgorithm, signed_data: &[u8], signature_value: &[u8], ) -> Result<bool, DsigError>
Verify
signature_value over signed_data with the declared algorithm.Source§fn verify_with_policy(
&self,
policy: &VerificationPolicy,
algorithm: SignatureAlgorithm,
signed_data: &[u8],
signature_value: &[u8],
) -> Result<bool, DsigError>
fn verify_with_policy( &self, policy: &VerificationPolicy, algorithm: SignatureAlgorithm, signed_data: &[u8], signature_value: &[u8], ) -> Result<bool, DsigError>
Verify after applying operation-scoped compatibility semantics. Read more
Source§fn association_spki(&self, _algorithm: SignatureAlgorithm) -> Option<&[u8]>
fn association_spki(&self, _algorithm: SignatureAlgorithm) -> Option<&[u8]>
Borrow public SPKI describing this exact key after successful verification.
This is evidence only, never authorization for native verification or
private-key export. Composite handles expose their leaves instead. This
hook only borrows cached public metadata; it must not allocate, parse,
perform I/O or manufacture a different key after the decision.
Source§fn provider_binding(&self) -> Option<&ProviderBinding>
fn provider_binding(&self) -> Option<&ProviderBinding>
Exact external execution domain; a key cannot be moved between token sessions.
Source§fn verify_candidate_keys(
&self,
_verify: &mut dyn FnMut(&dyn VerifyingKey) -> Result<bool, DsigError>,
) -> Result<Option<bool>, DsigError>
fn verify_candidate_keys( &self, _verify: &mut dyn FnMut(&dyn VerifyingKey) -> Result<bool, DsigError>, ) -> Result<Option<bool>, DsigError>
Composite resolvers may try individual keys through the selected engine.
None identifies a leaf handle. Wrappers must preserve per-key policy
when forwarding the visitor; no public/private key copy is required.Source§fn verification_spki(
&self,
_algorithm: SignatureAlgorithm,
) -> Result<Option<&[u8]>, DsigError>
fn verification_spki( &self, _algorithm: SignatureAlgorithm, ) -> Result<Option<&[u8]>, DsigError>
Borrow public SPKI for native verification, validating method/key binding.
Opaque external keys may return
None; native providers then fail closed.Source§fn ecdsa_encoding(&self) -> EcdsaSignatureValueEncoding
fn ecdsa_encoding(&self) -> EcdsaSignatureValueEncoding
Wire encoding already selected by the immutable verification policy.
Source§fn verify_with_context(
&self,
algorithm: SignatureAlgorithm,
context: &SignatureContext,
data: &[u8],
signature: &[u8],
) -> Result<bool, DsigError>
fn verify_with_context( &self, algorithm: SignatureAlgorithm, context: &SignatureContext, data: &[u8], signature: &[u8], ) -> Result<bool, DsigError>
Verify with validated domain separation, rejecting unsupported contexts.
Auto Trait Implementations§
impl Freeze for HmacVerificationKey
impl RefUnwindSafe for HmacVerificationKey
impl Send for HmacVerificationKey
impl Sync for HmacVerificationKey
impl Unpin for HmacVerificationKey
impl UnsafeUnpin for HmacVerificationKey
impl UnwindSafe for HmacVerificationKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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