31 #include <gtest/gtest.h> 41 0x8b, 0x65, 0x59, 0x70, 0x15, 0x37, 0x99, 0xaf, 0x2a, 0xea, 0xdc, 0x9f, 0xf1, 0xad, 0xd0, 0xea,
42 0x6c, 0x72, 0x51, 0xd5, 0x41, 0x54, 0xcf, 0xa9, 0x2c, 0x17, 0x3a, 0x0d, 0xd3, 0x9c, 0x1f, 0x94,
43 0x6c, 0x72, 0x51, 0xd5, 0x41, 0x54, 0xcf, 0xa9, 0x2c, 0x17, 0x3a, 0x0d, 0xd3, 0x9c, 0x1f, 0x94,
44 0x8b, 0x65, 0x59, 0x70, 0x15, 0x37, 0x99, 0xaf, 0x2a, 0xea, 0xdc, 0x9f, 0xf1, 0xad, 0xd0, 0xea
47 static constexpr
const char expected[] =
48 "8b655970153799af2aeadc9ff1add0ea6c7251d54154cfa92c173a0dd39c1f94" 49 "6c7251d54154cfa92c173a0dd39c1f948b655970153799af2aeadc9ff1add0ea";
51 template<
typename T>
void *addressof(
T &t) {
return &t; }
59 static_assert(
alignof(
T) == 1,
"T must have 1 byte alignment");
60 static_assert(
sizeof(
T) <=
sizeof(
source),
"T is too large for source");
61 static_assert(
sizeof(
T) * 2 <=
sizeof(expected),
"T is too large for destination");
64 std::stringstream
out;
66 return out.str() ==
"BEGIN<" +
std::string{expected,
sizeof(
T) * 2} +
">END";
77 EXPECT_TRUE(is_formatted<crypto::key_derivation>());
92 unsigned char k0[32] = {0}, k1[32] = {0};
93 for (
unsigned int i0 = 0; i0 < 256; ++i0)
96 for (
unsigned int i1 = 0; i1 < 256; ++i1)
const CharType(& source)[N]
int crypto_verify_32(const unsigned char *, const unsigned char *)
#define EXPECT_TRUE(condition)
const crypto::secret_key null_skey
#define ASSERT_EQ(val1, val2)
const crypto::public_key null_pkey
const GenericPointer< typename T::ValueType > T2 value
void * memcpy(void *a, const void *b, size_t c)
T & unwrap(mlocked< T > &src)