Struct ipfs_embed::identity::ed25519::PublicKey
pub struct PublicKey(_);
Expand description
An Ed25519 public key.
Implementations§
§impl PublicKey
impl PublicKey
pub fn verify(&self, msg: &[u8], sig: &[u8]) -> bool
pub fn verify(&self, msg: &[u8], sig: &[u8]) -> bool
Verify the Ed25519 signature on a message using the public key.
pub fn encode(&self) -> [u8; 32]
pub fn encode(&self) -> [u8; 32]
Encode the public key into a byte array in compressed form, i.e. where one coordinate is represented by a single bit.
pub fn decode(k: &[u8]) -> Result<PublicKey, DecodingError>
pub fn decode(k: &[u8]) -> Result<PublicKey, DecodingError>
Decode a public key from a byte array as produced by encode
.
Trait Implementations§
§impl Ord for PublicKey
impl Ord for PublicKey
§impl PartialOrd<PublicKey> for PublicKey
impl PartialOrd<PublicKey> for PublicKey
§fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
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 more