pub struct SignatureInfo {
pub sig_type: SignatureType,
pub key_locator: Option<Arc<Name>>,
pub key_digest: Option<Bytes>,
pub sig_nonce: Option<Bytes>,
pub sig_time: Option<u64>,
pub sig_seq_num: Option<u64>,
}Expand description
SignatureInfo TLV — algorithm and optional key locator.
The KeyLocator TLV may carry either a Name (0x07) referencing the
signer’s certificate, or a KeyDigest (0x1d) carrying a SHA-256 of the
public key. Both forms are decoded; the unused field is None. At most
one of key_locator or key_digest is populated for a given packet.
Also decodes the anti-replay fields from InterestSignatureInfo: SignatureNonce (0x26), SignatureTime (0x28), SignatureSeqNum (0x2A).
Fields§
§sig_type: SignatureType§key_locator: Option<Arc<Name>>KeyLocator → Name form: the signer’s certificate name.
key_digest: Option<Bytes>KeyLocator → KeyDigest form: a hash of the signer’s public key.
Implementations resolve this against a local certificate cache.
sig_nonce: Option<Bytes>Random nonce for anti-replay (NDN Packet Format v0.3 §5.4).
sig_time: Option<u64>Timestamp in milliseconds since Unix epoch (NDN Packet Format v0.3 §5.4).
sig_seq_num: Option<u64>Monotonically increasing sequence number (NDN Packet Format v0.3 §5.4).
Implementations§
Source§impl SignatureInfo
impl SignatureInfo
pub fn decode(value: Bytes) -> Result<Self, PacketError>
Trait Implementations§
Source§impl Clone for SignatureInfo
impl Clone for SignatureInfo
Source§fn clone(&self) -> SignatureInfo
fn clone(&self) -> SignatureInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more