pub struct PublicKey(_);Implementations§
source§impl PublicKey
impl PublicKey
sourcepub const MULTICODEC_TYPE: [u8; 2] = _
pub const MULTICODEC_TYPE: [u8; 2] = _
Multicodec key type for Ed25519 keys.
sourcepub fn to_human_readable(&self) -> String
pub fn to_human_readable(&self) -> String
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))
Trait Implementations§
source§impl EcPk for PublicKey
impl EcPk for PublicKey
const COMPRESSED_LEN: usize = 32usize
const CURVE_NAME: &'static str = "Edward25519"
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 PartialEq<PublicKey> for PublicKey
impl PartialEq<PublicKey> for PublicKey
source§impl PartialOrd<PublicKey> for PublicKey
impl PartialOrd<PublicKey> for PublicKey
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§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