[−][src]Trait enr::EnrPublicKey
The trait required for a PublicKey
to verify an ENR record.
Required methods
fn verify_v4(&self, msg: &[u8], sig: &[u8]) -> bool
Verify an ENR signature for the v4
identity scheme.
fn encode(&self) -> Vec<u8>
Encodes the public key to bytes in compressed form, if possible.
fn encode_uncompressed(&self) -> Vec<u8>
Encodes the public key in uncompressed form.
fn enr_key(&self) -> String
Returns the ENR key identifier for the public key type. For secp256k1
keys this
is secp256k1
.
Implementations on Foreign Types
impl EnrPublicKey for PublicKey
[src]
fn verify_v4(&self, msg: &[u8], sig: &[u8]) -> bool
[src]
Verify a raw message, given a public key for the v4 identity scheme.
fn encode(&self) -> Vec<u8>
[src]
Encodes the public key into compressed form, if possible.
fn encode_uncompressed(&self) -> Vec<u8>
[src]
Encodes the public key in uncompressed form. This is the same as the compressed form for ed25519 keys
fn enr_key(&self) -> String
[src]
Generates the ENR public key string associated with the ed25519 key type.
impl EnrPublicKey for PublicKey
[src]
fn verify_v4(&self, msg: &[u8], sig: &[u8]) -> bool
[src]
Verify a raw message, given a public key for the v4 identity scheme.
fn encode(&self) -> Vec<u8>
[src]
Encodes the public key into compressed form, if possible.
fn encode_uncompressed(&self) -> Vec<u8>
[src]
Encodes the public key in uncompressed form.
fn enr_key(&self) -> String
[src]
Generates the ENR public key string associated with the secp256k1 key type.
impl EnrPublicKey for PublicKey
[src]
fn verify_v4(&self, msg: &[u8], sig: &[u8]) -> bool
[src]
fn encode(&self) -> Vec<u8>
[src]
fn encode_uncompressed(&self) -> Vec<u8>
[src]
fn enr_key(&self) -> String
[src]
Implementors
impl EnrPublicKey for CombinedPublicKey
[src]
fn verify_v4(&self, msg: &[u8], sig: &[u8]) -> bool
[src]
Verify a raw message, given a public key for the v4 identity scheme.
fn encode(&self) -> Vec<u8>
[src]
Encodes the public key into compressed form, if possible.
fn encode_uncompressed(&self) -> Vec<u8>
[src]
Encodes the public key in uncompressed form.
fn enr_key(&self) -> String
[src]
Generates the ENR public key string associated with the key type.