DDraceNetwork Docs
hash.cpp File Reference
#include <gtest/gtest.h>
#include <base/hash_ctxt.h>
#include <base/system.h>
Include dependency graph for hash.cpp:

Functions

template<size_t BufferSize = SHA256_MAXSTRSIZE>
static void ExpectSha256 (SHA256_DIGEST Actual, const char *pWanted)
 
 TEST (Hash, Sha256)
 
 TEST (Hash, Sha256ToStringSmallBuffer)
 
 TEST (Hash, Sha256ToStringLargeBuffer)
 
 TEST (Hash, Sha256Eq)
 
 TEST (Hash, Sha256FromStr)
 
template<size_t BufferSize = MD5_MAXSTRSIZE>
static void ExpectMd5 (MD5_DIGEST Actual, const char *pWanted)
 
 TEST (Hash, Md5)
 
 TEST (Hash, Md5ToStringSmallBuffer)
 
 TEST (Hash, Md5ToStringLargeBuffer)
 
 TEST (Hash, Md5Eq)
 
 TEST (Hash, Md5FromStr)
 

Function Documentation

◆ ExpectMd5()

template<size_t BufferSize = MD5_MAXSTRSIZE>
static void ExpectMd5 ( MD5_DIGEST  Actual,
const char *  pWanted 
)
static

◆ ExpectSha256()

template<size_t BufferSize = SHA256_MAXSTRSIZE>
static void ExpectSha256 ( SHA256_DIGEST  Actual,
const char *  pWanted 
)
static

◆ TEST() [1/10]

TEST ( Hash  ,
Md5   
)

◆ TEST() [2/10]

TEST ( Hash  ,
Md5Eq   
)

◆ TEST() [3/10]

TEST ( Hash  ,
Md5FromStr   
)

◆ TEST() [4/10]

TEST ( Hash  ,
Md5ToStringLargeBuffer   
)

◆ TEST() [5/10]

TEST ( Hash  ,
Md5ToStringSmallBuffer   
)

◆ TEST() [6/10]

TEST ( Hash  ,
Sha256   
)

◆ TEST() [7/10]

TEST ( Hash  ,
Sha256Eq   
)

◆ TEST() [8/10]

TEST ( Hash  ,
Sha256FromStr   
)

◆ TEST() [9/10]

TEST ( Hash  ,
Sha256ToStringLargeBuffer   
)

◆ TEST() [10/10]

TEST ( Hash  ,
Sha256ToStringSmallBuffer   
)