mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add 'hostid' to server_info
* Add json::Value conversion from beast::String * Update rippled-example.cfg
This commit is contained in:
@@ -470,4 +470,12 @@ void RFC1751::getEnglishFromKey (std::string& strHuman, const std::string& strKe
|
||||
strHuman = strFirst + " " + strSecond;
|
||||
}
|
||||
|
||||
// vim:ts=4
|
||||
String RFC1751::getWordFromBlob (void const* data, size_t bytes)
|
||||
{
|
||||
uint32 hash;
|
||||
|
||||
Murmur::Hash (data, bytes, 0, &hash);
|
||||
|
||||
return s_dictionary [hash % (sizeof (s_dictionary) / sizeof (s_dictionary [0]))];
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,15 @@ public:
|
||||
|
||||
static void getEnglishFromKey (std::string& strHuman, const std::string& strKey);
|
||||
|
||||
/** Chooses a single dictionary word from the data.
|
||||
|
||||
This is not particularly secure but it can be useful to provide
|
||||
a unique name for something given a GUID or fixed data. We use
|
||||
it to turn the pubkey_node into an easily remembered and identified
|
||||
4 character string.
|
||||
*/
|
||||
static String getWordFromBlob (void const* data, size_t bytes);
|
||||
|
||||
private:
|
||||
static unsigned long extract (char* s, int start, int length);
|
||||
static void btoe (std::string& strHuman, const std::string& strData);
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace ripple
|
||||
#include "crypto/ripple_CBigNum.h"
|
||||
#include "crypto/ripple_Base58.h" // VFALCO TODO Can be moved to .cpp if we clean up setAlphabet stuff
|
||||
#include "crypto/ripple_Base58Data.h"
|
||||
#include "crypto/ripple_RFC1751.h"
|
||||
|
||||
#include "protocol/ripple_FieldNames.h"
|
||||
#include "protocol/ripple_HashPrefix.h"
|
||||
|
||||
Reference in New Issue
Block a user