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