1#ifndef XRPL_PROTOCOL_SECRETKEY_H_INCLUDED
2#define XRPL_PROTOCOL_SECRETKEY_H_INCLUDED
4#include <xrpl/basics/Buffer.h>
5#include <xrpl/basics/Slice.h>
6#include <xrpl/protocol/KeyType.h>
7#include <xrpl/protocol/PublicKey.h>
8#include <xrpl/protocol/Seed.h>
9#include <xrpl/protocol/tokens.h>
156sign(PublicKey
const& pk, SecretKey
const& sk, Slice
const& message);
std::uint8_t const * data() const
const_iterator begin() const noexcept
SecretKey(SecretKey const &)=default
std::uint8_t const * const_iterator
const_iterator cend() const noexcept
SecretKey & operator=(SecretKey const &)=default
const_iterator cbegin() const noexcept
std::string to_string() const
Convert the secret key to a hexadecimal string.
const_iterator end() const noexcept
An immutable linear range of bytes.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
bool operator!=(Buffer const &lhs, Buffer const &rhs) noexcept
std::optional< AccountID > parseBase58(std::string const &s)
Parse AccountID from checked, base58 string.
std::pair< PublicKey, SecretKey > generateKeyPair(KeyType type, Seed const &seed)
Generate a key pair deterministically.
std::string encodeBase58Token(TokenType type, void const *token, std::size_t size)
Encode data in Base58Check format using XRPL alphabet.
PublicKey derivePublicKey(KeyType type, SecretKey const &sk)
Derive the public key from a secret key.
SecretKey generateSecretKey(KeyType type, Seed const &seed)
Generate a new secret key deterministically.
Buffer sign(PublicKey const &pk, SecretKey const &sk, Slice const &message)
Generate a signature for a message.
static Hasher::result_type digest(void const *data, std::size_t size) noexcept
SecretKey randomSecretKey()
Create a secret key using secure random numbers.
Buffer signDigest(PublicKey const &pk, SecretKey const &sk, uint256 const &digest)
Generate a signature for a message digest.
std::pair< PublicKey, SecretKey > randomKeyPair(KeyType type)
Create a key pair using secure random numbers.
constexpr bool operator==(base_uint< Bits, Tag > const &lhs, base_uint< Bits, Tag > const &rhs)