pub struct WirePassV1 {
pub participant: Vec<u8>,
pub public_key: [u8; 32],
pub conversations: Vec<u64>,
pub live: String,
pub may_enroll: bool,
pub issued_at: u64,
pub expires_at: u64,
pub signature: [u8; 64],
}Fields§
§participant: Vec<u8>§public_key: [u8; 32]§conversations: Vec<u64>§live: String§may_enroll: bool§issued_at: u64§expires_at: u64§signature: [u8; 64]Implementations§
Source§impl WirePassV1
impl WirePassV1
Sourcepub fn canonical_unsigned_bytes(&self) -> Result<Vec<u8>, PassCheckError>
pub fn canonical_unsigned_bytes(&self) -> Result<Vec<u8>, PassCheckError>
Encodes all signed fields in fixed order using big-endian lengths and integers.
§Errors
Returns PassCheckError::Malformed for noncanonical scope or time ordering.
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, PassCheckError>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, PassCheckError>
Encodes the complete pass including its signature.
§Errors
Returns PassCheckError::Malformed for noncanonical input.
Sourcepub fn parse(bytes: &[u8]) -> Result<Self, PassCheckError>
pub fn parse(bytes: &[u8]) -> Result<Self, PassCheckError>
Parses canonical version-1 bytes.
§Errors
Returns PassCheckError::Malformed for any format violation.
Sourcepub fn verify(
bytes: &[u8],
key: &VerifyingKey,
skew: u64,
now: SystemTime,
) -> Result<PassPrincipal, PassCheckError>
pub fn verify( bytes: &[u8], key: &VerifyingKey, skew: u64, now: SystemTime, ) -> Result<PassPrincipal, PassCheckError>
Verifies strict Ed25519 signature and the skew-bounded validity window.
§Errors
Returns the precise malformed, signature, or expired check failure.
Trait Implementations§
Source§impl Clone for WirePassV1
impl Clone for WirePassV1
Source§fn clone(&self) -> WirePassV1
fn clone(&self) -> WirePassV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WirePassV1
impl Debug for WirePassV1
impl Eq for WirePassV1
Source§impl PartialEq for WirePassV1
impl PartialEq for WirePassV1
impl StructuralPartialEq for WirePassV1
Auto Trait Implementations§
impl Freeze for WirePassV1
impl RefUnwindSafe for WirePassV1
impl Send for WirePassV1
impl Sync for WirePassV1
impl Unpin for WirePassV1
impl UnsafeUnpin for WirePassV1
impl UnwindSafe for WirePassV1
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.