Skip to content

Commit 017afe5

Browse files
committed
chore: clang-format partial revert
Signed-off-by: GeorgyFirsov <gfirsov007@gmail.com>
1 parent a511c5d commit 017afe5

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ColumnLimit: 0
7272
ConstructorInitializerIndentWidth: 4
7373
ContinuationIndentWidth: 4
7474

75-
Cpp11BracedListStyle: true
75+
Cpp11BracedListStyle: false
7676

7777
DeriveLineEnding: false
7878
DerivePointerAlignment: false

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.5.0)
2-
project(kdf-lib VERSION 1.0.0)
2+
project(kdf-lib VERSION 1.0.1)
33

44
#
55
# Global config

tests/cases/r1323665_1_022-2018.cpp

+17-11
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ KDFLIB_TESTS_ALIGN16 constexpr unsigned char kdf1_expected_key[] = {
128128
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
129129
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
130130
0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef,
131-
0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef};
131+
0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef
132+
};
132133

133134

134135
/**
@@ -138,26 +139,29 @@ KDFLIB_TESTS_ALIGN16 constexpr unsigned char kdf2_expected_key[] = {
138139
0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
139140
0xf7, 0xf7, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0,
140141
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
141-
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f};
142+
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
143+
};
142144

143145
} // namespace test::r1323665_1_022_2018
144146

145147

146148

147149
TEST(R1323665_1_022_2018, Kdf1)
148150
{
149-
KDFLIB_TESTS_ALIGN16 unsigned char key_buffer[sizeof(test::data::master_key)] = {0};
151+
KDFLIB_TESTS_ALIGN16 unsigned char key_buffer[sizeof(test::data::master_key)] = { 0 };
150152

151153
test::r1323665_1_022_2018::UserContext user_context = {
152-
.key_size = sizeof(key_buffer)};
154+
.key_size = sizeof(key_buffer)
155+
};
153156

154157
R1323665_1_022_2018_KDF1_CONTEXT kdf_context = {
155158
.key_buffer = key_buffer,
156159
.user_context = &user_context,
157160
.initialize_key = test::r1323665_1_022_2018::initialize_key,
158-
.derive_key = test::r1323665_1_022_2018::derive_key};
161+
.derive_key = test::r1323665_1_022_2018::derive_key
162+
};
159163

160-
KDFLIB_TESTS_ALIGN16 unsigned char key[sizeof(test::data::master_key)] = {0};
164+
KDFLIB_TESTS_ALIGN16 unsigned char key[sizeof(test::data::master_key)] = { 0 };
161165
r1323665_1_022_2018_kdf1(test::data::master_key, test::r1323665_1_022_2018::t,
162166
&kdf_context, key);
163167

@@ -168,12 +172,13 @@ TEST(R1323665_1_022_2018, Kdf1)
168172

169173
TEST(R1323665_1_022_2018, Kdf2)
170174
{
171-
KDFLIB_TESTS_ALIGN16 unsigned char key_buffer[sizeof(test::data::master_key)] = {0};
172-
KDFLIB_TESTS_ALIGN16 unsigned char format_buffer[sizeof(unsigned long long) * 6] = {0};
175+
KDFLIB_TESTS_ALIGN16 unsigned char key_buffer[sizeof(test::data::master_key)] = { 0 };
176+
KDFLIB_TESTS_ALIGN16 unsigned char format_buffer[sizeof(unsigned long long) * 6] = { 0 };
173177

174178
test::r1323665_1_022_2018::UserContext user_context = {
175179
.key_size = sizeof(key_buffer),
176-
.format_size = sizeof(format_buffer)};
180+
.format_size = sizeof(format_buffer)
181+
};
177182

178183
R1323665_1_022_2018_KDF2_CONTEXT kdf_context = {
179184
.key_buffer = key_buffer,
@@ -182,9 +187,10 @@ TEST(R1323665_1_022_2018, Kdf2)
182187
.user_context = &user_context,
183188
.initialize_key = test::r1323665_1_022_2018::initialize_key,
184189
.format = test::r1323665_1_022_2018::format,
185-
.mac = test::r1323665_1_022_2018::mac};
190+
.mac = test::r1323665_1_022_2018::mac
191+
};
186192

187-
KDFLIB_TESTS_ALIGN16 unsigned char key[sizeof(test::data::master_key)] = {0};
193+
KDFLIB_TESTS_ALIGN16 unsigned char key[sizeof(test::data::master_key)] = { 0 };
188194
r1323665_1_022_2018_kdf2(test::data::master_key,
189195
test::r1323665_1_022_2018::iv,
190196
test::r1323665_1_022_2018::l,

tests/include/test_data.hpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ KDFLIB_TESTS_ALIGN16 inline constexpr unsigned char master_key[] = {
1717
0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
1818
0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0,
1919
0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8,
20-
0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0};
20+
0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0
21+
};
2122

2223

2324
/**
@@ -27,6 +28,7 @@ KDFLIB_TESTS_ALIGN16 inline constexpr unsigned char salt[] = {
2728
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
2829
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
2930
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
30-
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f};
31+
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
32+
};
3133

3234
} // namespace test::data

0 commit comments

Comments
 (0)