pub struct Verified<'r, 'a> { /* private fields */ }verify only.Expand description
A checked signature.
There is no public constructor: the only way to hold one is to have run
verify. That is deliberate — a -> bool API invites a caller to check
the boolean in one function and act on the record in another, which is how
“verified” quietly becomes “parsed”.
Implementations§
Source§impl Verified<'_, '_>
impl Verified<'_, '_>
Sourcepub fn summary(&self) -> RecordSummary
pub fn summary(&self) -> RecordSummary
A serialisable report about this record and the check that was run.
Two things Record::summary cannot know: the verdict itself, in
RecordSummary::verification, and the three deviation kinds only a
signature check can find. The key travels with the verdict, because a
report that says “verified” without saying which key has answered half
the question.
Source§impl<'r, 'a> Verified<'r, 'a>
impl<'r, 'a> Verified<'r, 'a>
Sourcepub const fn algorithm(&self) -> SignatureAlgorithm
pub const fn algorithm(&self) -> SignatureAlgorithm
The algorithm actually used — from SA, or its default.
Sourcepub const fn payload_digest(&self) -> [u8; 32]
pub const fn payload_digest(&self) -> [u8; 32]
SHA-256 of the signed bytes: this record’s identity.
Sourcepub fn deviations(&self) -> &[Deviation]
pub fn deviations(&self) -> &[Deviation]
Deviations found while parsing, plus any found while verifying — a
non-canonical DER encoding, a bare r‖s, a high-s signature.