20 #ifndef RIPPLE_PROTOCOL_PUBLICKEY_H_INCLUDED
21 #define RIPPLE_PROTOCOL_PUBLICKEY_H_INCLUDED
23 #include <ripple/basics/Slice.h>
24 #include <ripple/protocol/KeyType.h>
25 #include <ripple/protocol/STExchange.h>
26 #include <ripple/protocol/UintTypes.h>
27 #include <ripple/protocol/tokens.h>
156 template <
class Hasher>
179 return std::make_unique<STBlob>(f, t.
data(), t.
size());
244 PublicKey
const& publicKey,
247 bool mustBeFullyCanonical =
true) noexcept;
255 PublicKey const& publicKey,
258 bool mustBeFullyCanonical = true) noexcept;
std::uint8_t const * data() const noexcept
NodeID calcNodeID(PublicKey const &pk)
Calculate the 160-bit node ID from a node public key.
base_uint< 160, detail::NodeIDTag > NodeID
NodeID is a 160-bit hash representing one node.
An immutable linear range of bytes.
bool verify(PublicKey const &publicKey, Slice const &m, Slice const &sig, bool mustBeFullyCanonical) noexcept
Verify a signature on a message.
bool empty() const noexcept
const_iterator cend() const noexcept
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
Slice slice() const noexcept
std::ostream & operator<<(std::ostream &os, TOffer< TIn, TOut > const &offer)
bool operator==(Manifest const &lhs, Manifest const &rhs)
static Hasher::result_type digest(void const *data, std::size_t size) noexcept
std::optional< KeyType > publicKeyType(Slice const &slice)
Returns the type of public key.
static std::unique_ptr< STBlob > set(SField const &f, PublicKey const &t)
std::uint8_t const * const_iterator
bool operator<(CanonicalTXSet::Key const &lhs, CanonicalTXSet::Key const &rhs)
std::size_t size() const noexcept
T lexicographical_compare(T... args)
AccountID calcAccountID(PublicKey const &pk)
std::optional< ECDSACanonicality > ecdsaCanonicality(Slice const &sig)
Determine whether a signature is canonical.
static void get(std::optional< value_type > &t, STBlob const &u)
Convert between serialized type U and C++ type T.
PublicKey & operator=(PublicKey const &other)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string encodeBase58Token(TokenType type, void const *token, std::size_t size)
Encode data in Base58Check format using XRPL alphabet.
bool verifyDigest(PublicKey const &publicKey, uint256 const &digest, Slice const &sig, bool mustBeFullyCanonical) noexcept
Verify a secp256k1 signature on the digest of a message.
const_iterator begin() const noexcept
const_iterator end() const noexcept
void hash_append(Hasher &h, ValidatorBlobInfo const &blobInfo)
std::optional< AccountID > parseBase58(std::string const &s)
Parse AccountID from checked, base58 string.
const_iterator cbegin() const noexcept
base_uint< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
std::uint8_t const * data() const