17 #include <gtest/gtest.h>
19 #include "../../crypto/internal.h"
20 #include "../../crypto/test/test_util.h"
33 {0xbb, 0x56, 0xb1, 0x27, 0x7c, 0x4c, 0xdd, 0x5a, 0x99, 0x90, 0x1e, 0x6f,
34 0xeb, 0x36, 0x6c, 0xf3},
35 {0xa6, 0x5b, 0xe0, 0x99, 0xad, 0x5d, 0x91, 0x98, 0x37, 0xc1, 0xa4, 0x7f,
36 0x01, 0x24, 0x9a, 0x6b},
37 {0xd5, 0x8a, 0x5c, 0x29, 0xeb, 0xee, 0xed, 0x76},
38 {0x01, 0x8d, 0x1b, 0x42, 0xb8, 0x77, 0xc8, 0x84, 0x25, 0x7d, 0xd4, 0x89,
39 0x8d, 0xc1, 0xbc, 0x2a},
40 {0xc1, 0x05, 0xa1, 0x9a, 0xb4, 0xc4, 0xd0, 0x15,
41 0x9d, 0xfd, 0xea, 0xd0, 0xc3, 0x54, 0xe5, 0x33,
42 0x26, 0xac, 0x25, 0xf3, 0x48, 0xbc, 0xf6, 0xa2},
45 {0x5d, 0x98, 0xa9, 0xd2, 0x27, 0x5d, 0xc8, 0x8c, 0x8c, 0xee, 0x23, 0x7f,
46 0x8e, 0x2b, 0xd4, 0x8d},
47 {0x60, 0xec, 0x31, 0xda, 0x25, 0x07, 0x02, 0x14, 0x84, 0x44, 0x96, 0xa6,
48 0x04, 0x81, 0xca, 0x4e},
49 {0x96, 0x4c, 0xa4, 0x07, 0xee, 0x1c, 0xd1, 0xfb},
50 {0x58, 0x62, 0x29, 0x62, 0x23, 0x69, 0x9e, 0xe8, 0x27, 0xc2, 0xcd, 0x5b,
51 0x35, 0xf1, 0xdf, 0xa4},
52 {0x1c, 0xd0, 0x29, 0xe5, 0xf3, 0xdb, 0x65, 0x60,
53 0x05, 0xde, 0x01, 0x2b, 0x10, 0x09, 0x44, 0x56,
54 0x59, 0x44, 0x00, 0x26, 0xdb, 0xb3, 0x2d, 0x98},
59 unsigned test_num = 0;
65 int out_bytes, final_bytes;
67 bssl::ScopedEVP_CIPHER_CTX
ctx;
72 sizeof(
test.plaintext)));
74 EXPECT_EQ(
static_cast<size_t>(out_bytes + final_bytes),
75 sizeof(
test.plaintext));
78 bssl::ScopedEVP_CIPHER_CTX decrypt_ctx;
85 sizeof(
test.ecb_ciphertext)));
88 EXPECT_EQ(
static_cast<size_t>(out_bytes + final_bytes),
89 sizeof(
test.plaintext));
95 unsigned test_num = 0;
101 int out_bytes, final_bytes;
103 bssl::ScopedEVP_CIPHER_CTX
ctx;
107 sizeof(
test.plaintext)));
109 EXPECT_EQ(
static_cast<size_t>(out_bytes + final_bytes),
110 sizeof(
test.cbc_ciphertext));
113 bssl::ScopedEVP_CIPHER_CTX decrypt_ctx;
118 sizeof(
test.cbc_ciphertext)));
121 EXPECT_EQ(
static_cast<size_t>(out_bytes + final_bytes),
122 sizeof(
test.plaintext));