20#include <xrpl/basics/Blob.h> 
   21#include <xrpl/basics/Slice.h> 
   22#include <xrpl/basics/base_uint.h> 
   23#include <xrpl/basics/contract.h> 
   24#include <xrpl/beast/utility/rngfill.h> 
   25#include <xrpl/crypto/RFC1751.h> 
   26#include <xrpl/crypto/csprng.h> 
   27#include <xrpl/crypto/secure_erase.h> 
   28#include <xrpl/protocol/AccountID.h> 
   29#include <xrpl/protocol/PublicKey.h> 
   30#include <xrpl/protocol/SecretKey.h> 
   31#include <xrpl/protocol/Seed.h> 
   32#include <xrpl/protocol/digest.h> 
   33#include <xrpl/protocol/tokens.h> 
   79    h(passPhrase.
data(), passPhrase.
size());
 
 
   91    if (result.size() != 16)
 
 
  102    if (parseBase58<AccountID>(str) ||
 
  118    if (
auto seed = parseBase58<Seed>(str))
 
 
T back_inserter(T... args)
 
static void getEnglishFromKey(std::string &strHuman, std::string const &strKey)
Convert to human from a 128 bit key in big-endian format.
 
static int getKeyFromEnglish(std::string &strKey, std::string const &strHuman)
Convert words separated by spaces into a 128 bit key in big-endian format.
 
Seeds are used to generate deterministic secret keys.
 
std::array< uint8_t, 16 > buf_
 
std::uint8_t const * data() const
 
An immutable linear range of bytes.
 
std::uint8_t const * data() const noexcept
Return a pointer to beginning of the storage.
 
std::size_t size() const noexcept
Returns the number of bytes in the storage.
 
Integers of any length that is a multiple of 32-bits.
 
static constexpr std::size_t size()
 
constexpr bool parseHex(std::string_view sv)
Parse a hex string into a base_uint.
 
void rngfill(void *const buffer, std::size_t const bytes, Generator &g)
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
std::optional< AccountID > parseBase58(std::string const &s)
Parse AccountID from checked, base58 string.
 
Seed randomSeed()
Create a seed using secure random numbers.
 
csprng_engine & crypto_prng()
The default cryptographically secure PRNG.
 
std::string seedAs1751(Seed const &seed)
Encode a Seed in RFC1751 format.
 
std::string decodeBase58Token(std::string const &s, TokenType type)
 
static Hasher::result_type digest(void const *data, std::size_t size) noexcept
 
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
 
std::optional< Seed > parseGenericSeed(std::string const &str, bool rfc1751=true)
Attempt to parse a string as a seed.
 
Seed generateSeed(std::string const &passPhrase)
Generate a seed deterministically.
 
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
 
void secure_erase(void *dest, std::size_t bytes)
Attempts to clear the given blob of memory.
 
T reverse_copy(T... args)
 
Returns the SHA512-Half digest of a message.