pub struct VerifyingKey { /* private fields */ }Expand description
A verifying key for validating attestation tokens.
Wraps an Ed25519 public key used for verifying PASETO v4.public tokens. This key can be safely shared and distributed.
§Example
use agent_uri_attestation::{SigningKey, VerifyingKey};
let signing_key = SigningKey::generate();
let verifying_key = signing_key.verifying_key();
// Serialize for storage or transmission
let bytes = verifying_key.to_bytes();
// Deserialize later
let recovered = VerifyingKey::from_bytes(&bytes).unwrap();Implementations§
Source§impl VerifyingKey
impl VerifyingKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, AttestationError>
pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, AttestationError>
Creates a verifying key from raw bytes.
§Errors
Returns AttestationError::InvalidKeyFormat if the bytes are not a valid
Ed25519 public key (must be exactly 32 bytes representing a valid curve point).
Trait Implementations§
Source§impl Clone for VerifyingKey
impl Clone for VerifyingKey
Source§fn clone(&self) -> VerifyingKey
fn clone(&self) -> VerifyingKey
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 moreSource§impl Debug for VerifyingKey
impl Debug for VerifyingKey
Source§impl PartialEq for VerifyingKey
impl PartialEq for VerifyingKey
impl Eq for VerifyingKey
impl StructuralPartialEq for VerifyingKey
Auto Trait Implementations§
impl Freeze for VerifyingKey
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnwindSafe for VerifyingKey
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