pub struct KeyEntry {
pub public_key: VerifyingKey,
pub valid_from: Option<i64>,
pub valid_until: Option<i64>,
}Expand description
A registered public key plus an optional validity window (§7).
valid_from is inclusive, valid_until is exclusive. If both are
None, the key validates pins of any timestamp.
Fields§
§public_key: VerifyingKey32-byte Ed25519 public key.
valid_from: Option<i64>Earliest ts (inclusive) accepted under this key. UNIX epoch seconds.
valid_until: Option<i64>Latest ts (exclusive) accepted under this key. UNIX epoch seconds.
Implementations§
Source§impl KeyEntry
impl KeyEntry
Sourcepub fn new(public_key: VerifyingKey) -> Self
pub fn new(public_key: VerifyingKey) -> Self
Create a KeyEntry with no validity window.
Sourcepub fn from_public_bytes(raw: [u8; 32]) -> Result<Self, VerifyError>
pub fn from_public_bytes(raw: [u8; 32]) -> Result<Self, VerifyError>
Construct from raw 32-byte public-key material.
Sourcepub fn with_valid_from(self, ts_unix_seconds: i64) -> Self
pub fn with_valid_from(self, ts_unix_seconds: i64) -> Self
Builder: attach a valid_from lower bound (inclusive).
Sourcepub fn with_valid_until(self, ts_unix_seconds: i64) -> Self
pub fn with_valid_until(self, ts_unix_seconds: i64) -> Self
Builder: attach a valid_until upper bound (exclusive).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyEntry
impl RefUnwindSafe for KeyEntry
impl Send for KeyEntry
impl Sync for KeyEntry
impl Unpin for KeyEntry
impl UnsafeUnpin for KeyEntry
impl UnwindSafe for KeyEntry
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