23 using namespace folly;
38 auto expected = vector<uint8_t>(32);
40 SHA256(combined.data(), combined.size(), expected.data());
42 auto out = vector<uint8_t>(32);
43 OpenSSLHash::sha256(
range(out), buf);
47 TEST_F(OpenSSLHashTest, sha256_hashcopy) {
48 std::array<uint8_t, 32> expected, actual;
62 TEST_F(OpenSSLHashTest, sha256_hashcopy_intermediate) {
63 std::array<uint8_t, 32> expected, actual;
80 TEST_F(OpenSSLHashTest, hmac_sha256) {
89 auto expected = vector<uint8_t>(32);
100 auto out = vector<uint8_t>(32);
101 OpenSSLHash::hmac_sha256(
range(out), key, buf);
void hash_init(const EVP_MD *md)
#define EXPECT_EQ(val1, val2)
—— Concurrent Priority Queue Implementation ——
size_t countChainElements() const
Gen range(Value begin, Value end)
constexpr std::decay< T >::type copy(T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value))))
void hash_final(MutableByteRange out)
void hash_update(ByteRange data)
void prependChain(std::unique_ptr< IOBuf > &&iobuf)
std::size_t computeChainDataLength() const
Range< const unsigned char * > ByteRange
Range< const char * > StringPiece
TEST_F(OpenSSLHashTest, sha256)