pub struct ProvenanceSigner { /* private fields */ }Expand description
Provenance signer for UDM events.
Implementations§
Source§impl ProvenanceSigner
impl ProvenanceSigner
Sourcepub fn from_config(config: &ProvenanceConfig) -> PhyTraceResult<Self>
pub fn from_config(config: &ProvenanceConfig) -> PhyTraceResult<Self>
Create a new signer from configuration.
Sourcepub fn new(key_id: impl Into<String>, secret_key: Vec<u8>) -> Self
pub fn new(key_id: impl Into<String>, secret_key: Vec<u8>) -> Self
Create a new signer with raw key bytes.
Sourcepub fn sign(&self, event: &mut UdmEvent) -> PhyTraceResult<()>
pub fn sign(&self, event: &mut UdmEvent) -> PhyTraceResult<()>
Sign an event and add provenance information.
Sourcepub fn verify(&self, event: &UdmEvent) -> PhyTraceResult<bool>
pub fn verify(&self, event: &UdmEvent) -> PhyTraceResult<bool>
Verify an event’s provenance signature.
Trait Implementations§
Source§impl Clone for ProvenanceSigner
impl Clone for ProvenanceSigner
Source§fn clone(&self) -> ProvenanceSigner
fn clone(&self) -> ProvenanceSigner
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 moreAuto Trait Implementations§
impl Freeze for ProvenanceSigner
impl RefUnwindSafe for ProvenanceSigner
impl Send for ProvenanceSigner
impl Sync for ProvenanceSigner
impl Unpin for ProvenanceSigner
impl UnwindSafe for ProvenanceSigner
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