9 #include "sw/device/lib/base/status.h"
17 static const char kGettysburgPrelude[] =
18 "Four score and seven years ago our fathers brought forth on this "
19 "continent, a new nation, conceived in Liberty, and dedicated to the "
20 "proposition that all men are created equal.";
30 static const uint8_t kGettysburgDigest[] = {
31 0x1e, 0x6f, 0xd4, 0x03, 0x0f, 0x90, 0x34, 0xcd, 0x77, 0x57, 0x08,
32 0xa3, 0x96, 0xc3, 0x24, 0xed, 0x42, 0x0e, 0xc5, 0x87, 0xeb, 0x3d,
33 0xd4, 0x33, 0xe2, 0x9f, 0x6a, 0xc0, 0x8b, 0x8c, 0xc7, 0xba,
37 uint32_t digest_content[8];
40 .mode = kOtcryptoHashModeSha256,
42 .data = digest_content,
45 .len =
sizeof(kGettysburgPrelude) - 1,
46 .data = (
const uint8_t *)kGettysburgPrelude,
53 TRY_CHECK_ARRAYS_EQ((
const uint8_t *)digest.data, kGettysburgDigest,
58 OTTF_DEFINE_TEST_CONFIG();
63 return status_ok(result);