rippled
Loading...
Searching...
No Matches
RFC1751.h
1#pragma once
2
3#include <string>
4#include <vector>
5
6namespace xrpl {
7
8class RFC1751
9{
10public:
11 static int
12 getKeyFromEnglish(std::string& strKey, std::string const& strHuman);
13
14 static void
15 getEnglishFromKey(std::string& strHuman, std::string const& strKey);
16
24 static std::string
25 getWordFromBlob(void const* blob, size_t bytes);
26
27private:
28 static unsigned long
29 extract(char const* s, int start, int length);
30 static void
31 btoe(std::string& strHuman, std::string const& strData);
32 static void
33 insert(char* s, int x, int start, int length);
34 static void
35 standard(std::string& strWord);
36 static int
37 wsrch(std::string const& strWord, int iMin, int iMax);
38 static int
39 etob(std::string& strData, std::vector<std::string> vsHuman);
40
41 static char const* s_dictionary[];
42};
43
44} // namespace xrpl
static int wsrch(std::string const &strWord, int iMin, int iMax)
Definition RFC1751.cpp:275
static void standard(std::string &strWord)
Definition RFC1751.cpp:258
static int etob(std::string &strData, std::vector< std::string > vsHuman)
Definition RFC1751.cpp:309
static unsigned long extract(char const *s, int start, int length)
Definition RFC1751.cpp:175
static void btoe(std::string &strHuman, std::string const &strData)
Definition RFC1751.cpp:202
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:385
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:356
static std::string getWordFromBlob(void const *blob, size_t bytes)
Chooses a single dictionary word from the data.
Definition RFC1751.cpp:396
static char const * s_dictionary[]
Definition RFC1751.h:41
static void insert(char *s, int x, int start, int length)
Definition RFC1751.cpp:221
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5