pub struct PublicKey(/* private fields */);
Available on crate feature
ed25519
only.Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub const MULTICODEC_TYPE: [u8; 2]
Available on crate feature multibase
only.
pub const MULTICODEC_TYPE: [u8; 2]
multibase
only.Multicodec key type for Ed25519 keys.
Sourcepub fn to_human_readable(&self) -> String
Available on crate feature multibase
only.
pub fn to_human_readable(&self) -> String
multibase
only.Encode public key in human-readable format.
We use the format specified by the DID key
method, which is described as:
did:key:MULTIBASE(base58-btc, MULTICODEC(public-key-type, raw-public-key-bytes))
Methods from Deref<Target = PublicKey>§
pub const BYTES: usize = 32usize
Sourcepub fn verify_incremental(
&self,
signature: &Signature,
) -> Result<VerifyingState, Error>
pub fn verify_incremental( &self, signature: &Signature, ) -> Result<VerifyingState, Error>
Verify the signature of a multi-part message (streaming).
Trait Implementations§
Source§impl EcPk for PublicKey
impl EcPk for PublicKey
const COMPRESSED_LEN: usize = 32usize
const CURVE_NAME: &'static str = "Edwards25519"
type Compressed = [u8; 32]
fn base_point() -> Self
fn to_pk_compressed(&self) -> Self::Compressed
fn from_pk_compressed(pk: Self::Compressed) -> Result<Self, EcPkInvalid>
fn from_pk_compressed_slice(slice: &[u8]) -> Result<Self, EcPkInvalid>
Source§impl MultiDisplay<Encoding> for PublicKey
impl MultiDisplay<Encoding> for PublicKey
Source§impl Ord for PublicKey
impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
impl PartialOrd for PublicKey
Source§impl Wrapper for PublicKey
impl Wrapper for PublicKey
Source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
Source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
Source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
impl Copy for PublicKey
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 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