Monero
Functions
sha256.cpp File Reference
#include <boost/filesystem.hpp>
#include "gtest/gtest.h"
#include "common/util.h"
#include "string_tools.h"
#include "unit_tests_utils.h"
Include dependency graph for sha256.cpp:

Functions

static bool check (const std::string &data, const char *expected_hash_hex)
 
static std::string file_to_hex_hash (const std::string &filename)
 
 TEST (sha256, empty)
 
 TEST (sha256, small)
 
 TEST (sha256, large)
 
 TEST (sha256, emptyfile)
 
 TEST (sha256, smallfile)
 
 TEST (sha256, largefile)
 
 TEST (sha256, noexist)
 

Function Documentation

◆ check()

static bool check ( const std::string &  data,
const char *  expected_hash_hex 
)
static

◆ file_to_hex_hash()

static std::string file_to_hex_hash ( const std::string &  filename)
static

◆ TEST() [1/7]

TEST ( sha256  ,
empty   
)

◆ TEST() [2/7]

TEST ( sha256  ,
small   
)

◆ TEST() [3/7]

TEST ( sha256  ,
large   
)

◆ TEST() [4/7]

TEST ( sha256  ,
emptyfile   
)

◆ TEST() [5/7]

TEST ( sha256  ,
smallfile   
)

◆ TEST() [6/7]

TEST ( sha256  ,
largefile   
)

◆ TEST() [7/7]

TEST ( sha256  ,
noexist   
)