Example #1
0
TEST(SHATest, sha256Text_a_1m) {
	SHA sha;
	std::string hash = sha.sha256(boost::filesystem::path("src/test/hash/a_1m.dat"));
	ASSERT_EQ("cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0",hash);
}
Example #2
0
TEST(SHATest, sha256Text_abcdbcde) {
	SHA sha;
	std::string hash = sha.sha256(boost::filesystem::path("src/test/hash/abcdbcde.dat"));
	ASSERT_EQ("248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1",hash);
}
Example #3
0
TEST(SHATest, sha256Text_empty) {
	SHA sha;
	std::string hash = sha.sha256(boost::filesystem::path("src/test/hash/empty"));
	ASSERT_EQ("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",hash);
}
Example #4
0
TEST(SHATest, sha256Text_abc) {
	SHA sha;
	std::string hash = sha.sha256(boost::filesystem::path("src/test/hash/abc.dat"));
	ASSERT_EQ("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad",hash);
}
Example #5
0
TEST(SHATest, sha256Binary_Image) {
	SHA sha;
	std::string hash = sha.sha256(boost::filesystem::path("src/test/hash/testImage.jpg"));
	ASSERT_EQ("3100fc5145acab142a5935b6b9436e53cde05e7382f36dc1e67360b9ff96539b",hash);
}