The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Functions | Variables
hash.cpp File Reference
#include <iostream>
#include <string>
#include "md5.hpp"
#include "hash.hpp"
Include dependency graph for hash.cpp:

Go to the source code of this file.

Namespaces

 util
 

Functions

std::array< uint8_t, 16 > util::md5 (const std::string &input)
 Returns the MD5 digest for the specified input. More...
 
int util::get_iteration_count (const std::string &hash)
 
std::string util::get_salt (const std::string &hash)
 
bool util::is_valid_hash (const std::string &hash)
 
std::string util::encode_hash (const std::array< uint8_t, 16 > &input)
 
std::string util::create_hash (const std::string &password, const std::string &salt, int iteration_count)
 

Variables

const std::string util::itoa64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 
const std::string util::hash_prefix = "$H$"