aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/digest/argonish/ut_fat
diff options
context:
space:
mode:
authorcerevra <cerevra@yandex-team.ru>2022-02-10 16:45:59 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:59 +0300
commit4f292c7e2fd0a41da93fda51b2d440c979a330b7 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/digest/argonish/ut_fat
parentbf41dd01f6c920583e9faae7cd55ed25e547e052 (diff)
downloadydb-4f292c7e2fd0a41da93fda51b2d440c979a330b7.tar.gz
Restoring authorship annotation for <cerevra@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/digest/argonish/ut_fat')
-rw-r--r--library/cpp/digest/argonish/ut_fat/ut.cpp82
-rw-r--r--library/cpp/digest/argonish/ut_fat/ya.make4
2 files changed, 43 insertions, 43 deletions
diff --git a/library/cpp/digest/argonish/ut_fat/ut.cpp b/library/cpp/digest/argonish/ut_fat/ut.cpp
index 535b6d588a..41fa001685 100644
--- a/library/cpp/digest/argonish/ut_fat/ut.cpp
+++ b/library/cpp/digest/argonish/ut_fat/ut.cpp
@@ -1,5 +1,5 @@
-#include <library/cpp/digest/argonish/argon2.h>
-#include <library/cpp/digest/argonish/blake2b.h>
+#include <library/cpp/digest/argonish/argon2.h>
+#include <library/cpp/digest/argonish/blake2b.h>
#include <library/cpp/testing/unittest/registar.h>
Y_UNIT_TEST_SUITE(ArgonishTest) {
@@ -100,7 +100,7 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
}
Y_UNIT_TEST(Argon2d) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0x7b, 0xa5, 0xa1, 0x7a, 0x72, 0xf7, 0xe5, 0x99,
0x77, 0xf7, 0xf2, 0x3d, 0x10, 0xe6, 0x21, 0x89,
0x8c, 0x63, 0xce, 0xbe, 0xed, 0xda, 0xbd, 0x15,
@@ -116,17 +116,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2i) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0x87, 0x4d, 0x23, 0xfb, 0x9f, 0x55, 0xe2, 0xff,
0x66, 0xbc, 0x19, 0x03, 0x46, 0xe7, 0x01, 0x19,
0x7c, 0x9f, 0x25, 0xd1, 0x1d, 0xa4, 0x5a, 0xad,
@@ -142,17 +142,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2i->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2i->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2id) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0x99, 0xdf, 0xcf, 0xc2, 0x89, 0x76, 0x93, 0x9d,
0xa2, 0x97, 0x09, 0x44, 0x34, 0xd8, 0x6f, 0xd0,
0x0c, 0x94, 0x9a, 0x0f, 0x31, 0x8c, 0x22, 0xf0,
@@ -168,17 +168,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2id->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2id->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2d_2p) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0x59, 0xb0, 0x94, 0x62, 0xcf, 0xdc, 0xd2, 0xb4,
0x0a, 0xbd, 0x17, 0x81, 0x0a, 0x47, 0x4a, 0x8e,
0xc1, 0xab, 0xb7, 0xc1, 0x8d, 0x07, 0x53, 0x7c,
@@ -194,17 +194,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2i_2p) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0xc1, 0x0f, 0x00, 0x5e, 0xf8, 0x78, 0xc8, 0x07,
0x0e, 0x2c, 0xc5, 0x2f, 0x57, 0x75, 0x25, 0xc9,
0x71, 0xc7, 0x30, 0xeb, 0x00, 0x64, 0x4a, 0x4e,
@@ -220,17 +220,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2i->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2i->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2id_2p) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0x6c, 0x00, 0xb7, 0xa9, 0x00, 0xe5, 0x00, 0x4c,
0x24, 0x46, 0x9e, 0xc1, 0xe7, 0xc0, 0x1a, 0x99,
0xb2, 0xb8, 0xf7, 0x73, 0x75, 0xd4, 0xec, 0xa7,
@@ -246,17 +246,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2id->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2id->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2d_2p_2th) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0x2b, 0x47, 0x35, 0x39, 0x4a, 0x40, 0x3c, 0xc9,
0x05, 0xfb, 0x51, 0x25, 0x96, 0x68, 0x64, 0x43,
0x02, 0x16, 0x38, 0xa6, 0xc1, 0x58, 0xfc, 0x8d,
@@ -272,17 +272,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2id_2p_4th) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0x4f, 0x93, 0xb5, 0xad, 0x78, 0xa4, 0xa9, 0x49,
0xfb, 0xe3, 0x55, 0x96, 0xd5, 0xa0, 0xc2, 0xab,
0x6f, 0x52, 0x2d, 0x2d, 0x29, 0xbc, 0x98, 0x49,
@@ -298,17 +298,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2id->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2id->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2d_2p_4th) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0x8f, 0xa2, 0x7c, 0xed, 0x28, 0x38, 0x79, 0x0f,
0xba, 0x5c, 0x11, 0x85, 0x1c, 0xdf, 0x90, 0x88,
0xb2, 0x18, 0x44, 0xd7, 0xf0, 0x4c, 0x97, 0xb2,
@@ -324,17 +324,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2i_2p_4th) {
- const ui8 TResult[32] = {
+ const ui8 TResult[32] = {
0x61, 0x1c, 0x99, 0x3c, 0xb0, 0xb7, 0x23, 0x16,
0xbd, 0xa2, 0x6c, 0x4c, 0x2f, 0xe8, 0x2d, 0x39,
0x9c, 0x8f, 0x1c, 0xfd, 0x45, 0xd9, 0x58, 0xa9,
@@ -350,17 +350,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2i->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2i->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Argon2d_128) {
- const ui8 TResult[128] = {
+ const ui8 TResult[128] = {
0x4e, 0xc4, 0x6c, 0x4e, 0x8c, 0x32, 0x89, 0x65,
0xf9, 0x82, 0x2b, 0x00, 0x95, 0x00, 0x50, 0x0a,
0x72, 0x0d, 0xc5, 0x12, 0x8d, 0x6b, 0xbd, 0x84,
@@ -388,35 +388,35 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt),
result, sizeof(result), GenKatAAD, sizeof(GenKatAAD));
- UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
+ UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0);
UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword),
GenKatSalt, sizeof(GenKatSalt),
- TResult, sizeof(TResult),
+ TResult, sizeof(TResult),
GenKatAAD, sizeof(GenKatAAD)));
}
}
Y_UNIT_TEST(Blake2B_16_ABC) {
- const ui8 TResult[16] = {
+ const ui8 TResult[16] = {
0xcf, 0x4a, 0xb7, 0x91, 0xc6, 0x2b, 0x8d, 0x2b,
0x21, 0x09, 0xc9, 0x02, 0x75, 0x28, 0x78, 0x16};
const ui8 data[] = {'a', 'b', 'c'};
NArgonish::TBlake2BFactory factory;
for (int i = (int)NArgonish::EInstructionSet::REF; i <= (int)MaxArch; ++i) {
- auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult));
+ auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult));
ui8 hashResult[16] = {0};
blake2b->Update(data, sizeof(data));
blake2b->Final(hashResult, sizeof(hashResult));
- UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0);
+ UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0);
}
}
Y_UNIT_TEST(Blake2B_64_ABC) {
- const ui8 TResult[64] = {
+ const ui8 TResult[64] = {
0xba, 0x80, 0xa5, 0x3f, 0x98, 0x1c, 0x4d, 0x0d,
0x6a, 0x27, 0x97, 0xb6, 0x9f, 0x12, 0xf6, 0xe9,
0x4c, 0x21, 0x2f, 0x14, 0x68, 0x5a, 0xc4, 0xb7,
@@ -429,13 +429,13 @@ Y_UNIT_TEST_SUITE(ArgonishTest) {
NArgonish::TBlake2BFactory factory;
for (int i = (int)NArgonish::EInstructionSet::REF; i <= (int)(int)MaxArch; ++i) {
- auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult));
+ auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult));
ui8 hashResult[64] = {0};
blake2b->Update(data, sizeof(data));
blake2b->Final(hashResult, sizeof(hashResult));
- UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0);
+ UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0);
}
}
}
diff --git a/library/cpp/digest/argonish/ut_fat/ya.make b/library/cpp/digest/argonish/ut_fat/ya.make
index 2d79d1b50d..94ebda9225 100644
--- a/library/cpp/digest/argonish/ut_fat/ya.make
+++ b/library/cpp/digest/argonish/ut_fat/ya.make
@@ -1,9 +1,9 @@
-UNITTEST_FOR(library/cpp/digest/argonish)
+UNITTEST_FOR(library/cpp/digest/argonish)
OWNER(e-sidorov)
PEERDIR(
- library/cpp/digest/argonish
+ library/cpp/digest/argonish
)
SRCS(