pub struct SignatureEntry {
pub signer_id: Option<String>,
pub public_key: String,
pub signature: String,
pub timestamp: DateTime<Utc>,
pub metadata: HashMap<String, String>,
}Expand description
A single signature entry with metadata.
Fields§
§signer_id: Option<String>Optional identifier for the signer (e.g., email, name).
public_key: StringThe public key that created this signature (base64 encoded).
signature: StringThe Ed25519 signature bytes (base64 encoded).
timestamp: DateTime<Utc>Timestamp when the signature was created.
metadata: HashMap<String, String>Optional additional metadata.
Implementations§
Source§impl SignatureEntry
impl SignatureEntry
Sourcepub fn get_public_key(&self) -> Result<PublicKey>
pub fn get_public_key(&self) -> Result<PublicKey>
Get the public key from this entry.
Sourcepub fn get_signature_bytes(&self) -> Result<[u8; 64]>
pub fn get_signature_bytes(&self) -> Result<[u8; 64]>
Get the signature bytes.
Sourcepub fn verify(&self, document_hash: &DocumentHash) -> Result<()>
pub fn verify(&self, document_hash: &DocumentHash) -> Result<()>
Verify this signature against a document hash.
Trait Implementations§
Source§impl Clone for SignatureEntry
impl Clone for SignatureEntry
Source§fn clone(&self) -> SignatureEntry
fn clone(&self) -> SignatureEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SignatureEntry
impl Debug for SignatureEntry
Source§impl<'de> Deserialize<'de> for SignatureEntry
impl<'de> Deserialize<'de> for SignatureEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SignatureEntry
impl RefUnwindSafe for SignatureEntry
impl Send for SignatureEntry
impl Sync for SignatureEntry
impl Unpin for SignatureEntry
impl UnwindSafe for SignatureEntry
Blanket Implementations§
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