pub struct PublicKey(/* private fields */);Expand description
An Ed25519 public key used to verify a signature + message.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
pub fn from_bytes(bytes: &[u8; 32]) -> Self
Builds the public key from an array of bytes.
Sourcepub fn from_der_subject_public_key_info(spki: &[u8]) -> Option<Self>
pub fn from_der_subject_public_key_info(spki: &[u8]) -> Option<Self>
Parse a public key in SubjectPublicKeyInfo format.
Sourcepub fn to_der_subject_public_key_info(&self) -> Buffer
pub fn to_der_subject_public_key_info(&self) -> Buffer
Serialize this key in SubjectPublicKeyInfo format.
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