pub struct KeyRecord {
pub id: String,
pub version: u16,
pub ed25519: [u8; 32],
pub x25519: [u8; 32],
pub created_at: DateTime<Utc>,
pub expires_at: Option<DateTime<Utc>>,
}Expand description
A record containing both Ed25519 and X25519 public keys along with metadata.
Fields§
§id: String§version: u16§ed25519: [u8; 32]§x25519: [u8; 32]§created_at: DateTime<Utc>§expires_at: Option<DateTime<Utc>>Implementations§
Source§impl KeyRecord
impl KeyRecord
Sourcepub fn signing_key(&self) -> Result<VerifyingKey, Error>
pub fn signing_key(&self) -> Result<VerifyingKey, Error>
Gets the Ed25519 verifying key.
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Gets the X25519 public key.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Checks if the key record is expired based on the current time.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyRecord
impl<'de> Deserialize<'de> for KeyRecord
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 KeyRecord
impl RefUnwindSafe for KeyRecord
impl Send for KeyRecord
impl Sync for KeyRecord
impl Unpin for KeyRecord
impl UnwindSafe for KeyRecord
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