Enum libp2p::core::PublicKey [−][src]
Expand description
The public key of a node’s identity keypair.
Variants
Ed25519(PublicKey)
A public Ed25519 key.
Tuple Fields of Ed25519
0: PublicKey
Rsa(PublicKey)
A public RSA key.
Tuple Fields of Rsa
0: PublicKey
Secp256k1(PublicKey)
A public Secp256k1 key.
Tuple Fields of Secp256k1
0: PublicKey
Implementations
Verify a signature for a message using this public key, i.e. check that the signature has been produced by the corresponding private key (authenticity), and that the message has not been tampered with (integrity).
Encode the public key into a protobuf structure for storage or exchange with other nodes.
Decode a public key from a protobuf structure, e.g. read from storage or received from another node.
Convert the PublicKey
into the corresponding PeerId
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations
Mutably borrows from an owned value. Read more