class
PublicKeyRepresent an Ed25519 prublic key.
Derived classes
- class cardano::VRFPublicKey
- Represents a VRF public key.
Constructors, destructors, conversion operators
-
PublicKey(std::
span<const uint8_t, PUBLIC_ KEY_ SIZE> pub) explicit - Construct a key object from a span of key bytes.
Public functions
- auto bytes() const → const PubKeyByteArray& constexpr
- Return a constant reference to the public key byte array.
-
auto verifySignature(std::
span<const uint8_t> msg, std:: span<const uint8_t, SIGNATURE_ SIZE> sig) const → bool - Verify a signature using the public key.
Function documentation
cardano:: ed25519:: PublicKey:: PublicKey(std:: span<const uint8_t, PUBLIC_ KEY_ SIZE> pub) explicit
Construct a key object from a span of key bytes.
Parameters | |
---|---|
pub | An array of 32 bytes that will be copied into the object. |
bool cardano:: ed25519:: PublicKey:: verifySignature(std:: span<const uint8_t> msg,
std:: span<const uint8_t, SIGNATURE_ SIZE> sig) const
Verify a signature using the public key.
Parameters | |
---|---|
msg | A span of bytes (uint8_t) representing the original message. |
sig | A span of 64 bytes (uint8_t) representing the signature. |