pub struct PublicKey(/* private fields */);Expand description
An ed25519 public key that verifies shared entries.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn id(&self) -> String
pub fn id(&self) -> String
The key id: the first 16 hex digits of the SHA-256 of the key. Entries name their signer by id; a reader verifies with the trusted key of that id, so a colliding id never verifies a signature.
Sourcepub fn parse(text: &str) -> Option<Self>
pub fn parse(text: &str) -> Option<Self>
Parses PublicKey::to_text (anything after the key on its line,
such as a comment, is ignored). Weak keys (small-order points) are
refused.
Trait Implementations§
impl Copy for PublicKey
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Forget for PublicKey
impl Freeze for PublicKey
impl Move 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