pub struct PublicKey(/* private fields */);Expand description
Ed25519 verification key. Stored in project.yaml as hex.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn verify(&self, message: &[u8], signature: &[u8]) -> Result<(), Error>
pub fn verify(&self, message: &[u8], signature: &[u8]) -> Result<(), Error>
Verify a signature against this public key.
Sourcepub fn as_bytes(&self) -> [u8; 32]
pub fn as_bytes(&self) -> [u8; 32]
Raw 32-byte form. Used when binding the public key into authenticated-data fields outside hex encoding.
Sourcepub fn to_x25519_public_bytes(&self) -> [u8; 32]
pub fn to_x25519_public_bytes(&self) -> [u8; 32]
Convert this Ed25519 verification key to its X25519 (Montgomery
form) public counterpart. Pairs with
Keypair::to_x25519_secret_bytes for ECDH on the same identity
material. Returns 32 bytes suitable for x25519_dalek::PublicKey.
Trait Implementations§
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnsafeUnpin for PublicKey
impl UnwindSafe for PublicKey
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
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.