xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
crypto
RFC1751.h
1
#pragma once
2
3
#include <
cstddef
>
4
#include <
string
>
5
#include <
string_view
>
6
#include <
vector
>
7
8
namespace
xrpl
{
9
10
class
RFC1751
11
{
12
public
:
13
static
int
14
getKeyFromEnglish
(
std::string
& strKey,
std::string
const
& strHuman);
15
16
static
void
17
getEnglishFromKey
(
std::string
& strHuman,
std::string
const
& strKey);
18
27
static
std::string
28
getWordFromBlob
(
void
const
* blob,
size_t
bytes);
29
30
private
:
31
static
unsigned
long
32
extract
(
char
const
* s,
int
start,
int
length);
33
static
void
34
btoe
(
std::string
& strHuman,
std::string
const
& strData);
35
static
void
36
insert
(
char
* s,
int
x,
int
start,
int
length);
37
static
void
38
standard
(
std::string
& strWord);
39
static
int
40
wsrch
(
std::string_view
strWord,
int
iMin,
int
iMax);
41
static
int
42
etob
(
std::string
& strData,
std::vector<std::string>
vsHuman);
43
44
static
char
const
*
dictionary
[];
45
};
46
47
}
// namespace xrpl
std::string
std::string_view
xrpl::RFC1751
Definition
RFC1751.h:11
xrpl::RFC1751::wsrch
static int wsrch(std::string_view strWord, int iMin, int iMax)
Definition
RFC1751.cpp:310
xrpl::RFC1751::standard
static void standard(std::string &strWord)
Definition
RFC1751.cpp:285
xrpl::RFC1751::etob
static int etob(std::string &strData, std::vector< std::string > vsHuman)
Definition
RFC1751.cpp:344
xrpl::RFC1751::extract
static unsigned long extract(char const *s, int start, int length)
Definition
RFC1751.cpp:201
xrpl::RFC1751::btoe
static void btoe(std::string &strHuman, std::string const &strData)
Definition
RFC1751.cpp:228
xrpl::RFC1751::getEnglishFromKey
static void getEnglishFromKey(std::string &strHuman, std::string const &strKey)
Convert to human from a 128 bit key in big-endian format.
Definition
RFC1751.cpp:423
xrpl::RFC1751::getKeyFromEnglish
static int getKeyFromEnglish(std::string &strKey, std::string const &strHuman)
Convert words separated by spaces into a 128 bit key in big-endian format.
Definition
RFC1751.cpp:392
xrpl::RFC1751::getWordFromBlob
static std::string getWordFromBlob(void const *blob, size_t bytes)
Chooses a single dictionary word from the data.
Definition
RFC1751.cpp:434
xrpl::RFC1751::dictionary
static char const * dictionary[]
Definition
RFC1751.h:44
xrpl::RFC1751::insert
static void insert(char *s, int x, int start, int length)
Definition
RFC1751.cpp:248
cstddef
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
string
string_view
vector
Generated by
1.17.0