DDraceNetwork Documentation
Loading...
Searching...
No Matches
hash.h File Reference
#include <cstddef>
Include dependency graph for hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SHA256_DIGEST
struct  MD5_DIGEST

Enumerations

enum  { SHA256_DIGEST_LENGTH = 256 / 8 , SHA256_MAXSTRSIZE = 2 * SHA256_DIGEST_LENGTH + 1 , MD5_DIGEST_LENGTH = 128 / 8 , MD5_MAXSTRSIZE = 2 * MD5_DIGEST_LENGTH + 1 }

Functions

SHA256_DIGEST sha256 (const void *message, size_t message_len)
void sha256_str (SHA256_DIGEST digest, char *str, size_t max_len)
int sha256_from_str (SHA256_DIGEST *out, const char *str)
int sha256_comp (SHA256_DIGEST digest1, SHA256_DIGEST digest2)
MD5_DIGEST md5 (const void *message, size_t message_len)
void md5_str (MD5_DIGEST digest, char *str, size_t max_len)
int md5_from_str (MD5_DIGEST *out, const char *str)
int md5_comp (MD5_DIGEST digest1, MD5_DIGEST digest2)
bool operator== (const SHA256_DIGEST &that, const SHA256_DIGEST &other)
bool operator!= (const SHA256_DIGEST &that, const SHA256_DIGEST &other)
bool operator== (const MD5_DIGEST &that, const MD5_DIGEST &other)
bool operator!= (const MD5_DIGEST &that, const MD5_DIGEST &other)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SHA256_DIGEST_LENGTH 
SHA256_MAXSTRSIZE 
MD5_DIGEST_LENGTH 
MD5_MAXSTRSIZE 

Function Documentation

◆ md5()

MD5_DIGEST md5 ( const void * message,
size_t message_len )

◆ md5_comp()

int md5_comp ( MD5_DIGEST digest1,
MD5_DIGEST digest2 )

◆ md5_from_str()

int md5_from_str ( MD5_DIGEST * out,
const char * str )

◆ md5_str()

void md5_str ( MD5_DIGEST digest,
char * str,
size_t max_len )

◆ operator!=() [1/2]

bool operator!= ( const MD5_DIGEST & that,
const MD5_DIGEST & other )
inline

◆ operator!=() [2/2]

bool operator!= ( const SHA256_DIGEST & that,
const SHA256_DIGEST & other )
inline

◆ operator==() [1/2]

bool operator== ( const MD5_DIGEST & that,
const MD5_DIGEST & other )
inline

◆ operator==() [2/2]

bool operator== ( const SHA256_DIGEST & that,
const SHA256_DIGEST & other )
inline

◆ sha256()

SHA256_DIGEST sha256 ( const void * message,
size_t message_len )

◆ sha256_comp()

int sha256_comp ( SHA256_DIGEST digest1,
SHA256_DIGEST digest2 )

◆ sha256_from_str()

int sha256_from_str ( SHA256_DIGEST * out,
const char * str )

◆ sha256_str()

void sha256_str ( SHA256_DIGEST digest,
char * str,
size_t max_len )