pub trait SignMethod {
// Required methods
fn signature_type(&self) -> u64;
fn next_seq_num(&mut self) -> u64;
fn certificate(&self) -> Option<Certificate>;
fn sign(&self, data: &[u8]) -> Bytes;
// Provided method
fn time(&self) -> SignatureTime { ... }
}Expand description
Something that can sign Interests and
Data – see DigestSha256 and
SignatureSha256WithRsa for the implementations this crate provides.
Required Methods§
Sourcefn signature_type(&self) -> u64
fn signature_type(&self) -> u64
The signature type number this method produces (see signature_type).
Sourcefn next_seq_num(&mut self) -> u64
fn next_seq_num(&mut self) -> u64
Returns the next signing sequence number, advancing internal state so each call returns a new value.
Sourcefn certificate(&self) -> Option<Certificate>
fn certificate(&self) -> Option<Certificate>
The certificate this method signs with, if any (e.g. None for
DigestSha256, which signs without a key).
Provided Methods§
Sourcefn time(&self) -> SignatureTime
fn time(&self) -> SignatureTime
The current time, used as the default signing timestamp. Provided
so it doesn’t need to be implemented by every SignMethod.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".