34  std::linear_congruential_engine<
unsigned long long, 48271, 0,
 
   38  unsigned long long compat_val = engine();
 
   40  snprintf(buffer, 
sizeof(buffer) - 1, 
"%0llX", compat_val);
 
   41  return std::string(buffer);
 
 
   46  return Pincode(std::min(rand() % 10000 + 1, 9999));
 
 
   53  ss << std::setw(4) << std::setfill(
'0') << m_value;
 
 
   58  std::string hash_hex_str;
 
   59  picosha2::hash256_hex_string(
ToString(), hash_hex_str);
 
   60  return hash_hex_str.substr(0, 12);
 
 
A random generated int value with accessors for string and hashcode.
static std::string IntToHash(uint64_t value)
convert numeric value to hash string.
static Pincode Create()
Create a new pincode based on a random value.
std::string Hash() const
Return a hashvalue string.
std::string ToString() const
Return value as string.
uint64_t Get() const
Return numeric value:
std::string CompatHash()
Return a hashvalue as computed on 5.8 hosts.
Peer communications pincode abstraction.