MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Namespaces | Functions
auth.h File Reference
#include <string>

Go to the source code of this file.

Namespaces

 Secure
 

Functions

std::string Secure::hmac (std::string msg, std::string key, unsigned int hashSize, void hasher(const char *, const unsigned int, char *), unsigned int blockSize)
 Performs HMAC on msg with given key. More...
 
std::string Secure::hmac (const char *msg, const unsigned int msg_len, const char *key, const unsigned int key_len, unsigned int hashSize, void hasher(const char *, const unsigned int, char *), unsigned int blockSize)
 Performs HMAC on msg with given key. More...
 
std::string Secure::hmac_sha256 (std::string msg, std::string key)
 Convenience function that returns the hexadecimal alphanumeric HMAC-SHA256 of msg and key. More...
 
std::string Secure::hmac_sha256 (const char *msg, const unsigned int msg_len, const char *key, const unsigned int key_len)
 Convenience function that returns the hexadecimal alphanumeric HMAC-SHA256 of msg and key. More...
 
void Secure::hmac_sha256bin (const char *msg, const unsigned int msg_len, const char *key, const unsigned int key_len, char *output)
 Convenience function that sets output to the HMAC-SHA256 of msg and key in binary format. More...
 
void Secure::hmacbin (const char *msg, const unsigned int msg_len, const char *key, const unsigned int key_len, unsigned int hashSize, void hasher(const char *, const unsigned int, char *), unsigned int blockSize, char *output)
 Performs HMAC on msg with given key. More...
 
std::string Secure::md5 (std::string input)
 Calculates a MD5 digest as per rfc1321, returning it as a hexadecimal alphanumeric string. More...
 
std::string Secure::md5 (const char *input, const unsigned int in_len)
 Calculates a MD5 digest as per rfc1321, returning it as a hexadecimal alphanumeric string. More...
 
void Secure::md5bin (const char *input, const unsigned int in_len, char *output)
 Calculates a MD5 digest as per rfc1321, returning it as binary. More...
 
std::string Secure::sha256 (std::string input)
 Calculates a SHA256 digest as per NSAs SHA-2, returning it as a hexadecimal alphanumeric string. More...
 
std::string Secure::sha256 (const char *input, const unsigned int in_len)
 Calculates a SHA256 digest as per NSAs SHA-2, returning it as a hexadecimal alphanumeric string. More...
 
void Secure::sha256bin (const char *input, const unsigned int in_len, char *output)
 Calculates a SHA256 digest as per NSAs SHA-2, returning it as binary. More...