Struct trust_graph::Revocation
source · pub struct Revocation {
pub pk: PublicKey,
pub revoked_at: Duration,
pub revoked_by: PublicKey,
pub signature: Signature,
}Expand description
“A document” that cancels trust created before. TODO delete pk from Revoke (it is already in a trust node)
Fields§
§pk: PublicKeywho is revoked
revoked_at: Durationdate when revocation was created
revoked_by: PublicKeythe issuer of this revocation
signature: Signatureproof of this revocation
Implementations§
source§impl Revocation
impl Revocation
pub fn new( revoked_by: PublicKey, pk: PublicKey, revoked_at: Duration, signature: Signature ) -> Self
sourcepub fn create(
revoker: &KeyPair,
to_revoke: PublicKey,
revoked_at: Duration
) -> Self
pub fn create( revoker: &KeyPair, to_revoke: PublicKey, revoked_at: Duration ) -> Self
Creates new revocation signed by a revoker.
pub fn signature_bytes(pk: &PublicKey, revoked_at: Duration) -> Vec<u8> ⓘ
sourcepub fn verify(revoke: &Revocation) -> Result<(), RevokeError>
pub fn verify(revoke: &Revocation) -> Result<(), RevokeError>
Verifies that revocation is cryptographically correct.
Trait Implementations§
source§impl Clone for Revocation
impl Clone for Revocation
source§fn clone(&self) -> Revocation
fn clone(&self) -> Revocation
Returns a copy 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 Revocation
impl Debug for Revocation
source§impl<'de> Deserialize<'de> for Revocation
impl<'de> Deserialize<'de> for Revocation
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