pub struct PublicKey { /* private fields */ }Expand description
A P-256 public key that parsed, so it is a valid point on the curve.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn parse(text: &str) -> Result<Self>
pub fn parse(text: &str) -> Result<Self>
Parse ecdsa-p256:<base64 DER SPKI>. The point decoder rejects points
that are not on the curve and the identity, so an invalid-curve or
low-order key can’t enter a signer list.
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
The key in text form. Parsing re-encodes, so two spellings of one key give the same text.
Sourcepub fn fingerprint(&self) -> String
pub fn fingerprint(&self) -> String
SHA256:<hex> of the DER SubjectPublicKeyInfo, for display.
Trait Implementations§
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