diff options
author | tobo <tobo@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
commit | 55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/digest | |
parent | 7fe839092527589b38f014d854c51565b3c1adfa (diff) | |
download | ydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/digest')
-rw-r--r-- | library/cpp/digest/crc32c/crc32c.cpp | 2 | ||||
-rw-r--r-- | library/cpp/digest/lower_case/hash_ops_ut.cpp | 2 | ||||
-rw-r--r-- | library/cpp/digest/md5/md5_ut.cpp | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/digest/crc32c/crc32c.cpp b/library/cpp/digest/crc32c/crc32c.cpp index 913d4c9300a..369b46a2136 100644 --- a/library/cpp/digest/crc32c/crc32c.cpp +++ b/library/cpp/digest/crc32c/crc32c.cpp @@ -19,7 +19,7 @@ namespace { Pimpl->Delete(); } - inline ui32 Extend(ui32 init, const void* data, size_t n) const noexcept { + inline ui32 Extend(ui32 init, const void* data, size_t n) const noexcept { crcutil_interface::UINT64 sum = init; Pimpl->Compute(data, n, &sum); return (ui32)sum; diff --git a/library/cpp/digest/lower_case/hash_ops_ut.cpp b/library/cpp/digest/lower_case/hash_ops_ut.cpp index f4a730a00cb..a7ab0b86ea6 100644 --- a/library/cpp/digest/lower_case/hash_ops_ut.cpp +++ b/library/cpp/digest/lower_case/hash_ops_ut.cpp @@ -30,7 +30,7 @@ Y_UNIT_TEST_SUITE(TestCIHash) { } Y_UNIT_TEST(Test1) { - UNIT_ASSERT_VALUES_EQUAL(TCIOps()("aBc3"), TCIOps()(TStringBuf("AbC3"))); + UNIT_ASSERT_VALUES_EQUAL(TCIOps()("aBc3"), TCIOps()(TStringBuf("AbC3"))); UNIT_ASSERT(TCIOps()("aBc4", "AbC4")); } } diff --git a/library/cpp/digest/md5/md5_ut.cpp b/library/cpp/digest/md5/md5_ut.cpp index 9c466eab004..1c3e4ad0a9f 100644 --- a/library/cpp/digest/md5/md5_ut.cpp +++ b/library/cpp/digest/md5/md5_ut.cpp @@ -8,7 +8,7 @@ Y_UNIT_TEST_SUITE(TMD5Test) { Y_UNIT_TEST(TestMD5) { // echo -n 'qwertyuiopqwertyuiopasdfghjklasdfghjkl' | md5sum - constexpr const char* b = "qwertyuiopqwertyuiopasdfghjklasdfghjkl"; + constexpr const char* b = "qwertyuiopqwertyuiopasdfghjklasdfghjkl"; MD5 r; r.Update((const unsigned char*)b, 15); @@ -20,7 +20,7 @@ Y_UNIT_TEST_SUITE(TMD5Test) { UNIT_ASSERT_NO_DIFF(s, TStringBuf("3ac00dd696b966fd74deee3c35a59d8f")); - TString result = r.Calc(TStringBuf(b)); + TString result = r.Calc(TStringBuf(b)); result.to_lower(); UNIT_ASSERT_NO_DIFF(result, TStringBuf("3ac00dd696b966fd74deee3c35a59d8f")); } @@ -51,12 +51,12 @@ Y_UNIT_TEST_SUITE(TMD5Test) { Y_UNIT_TEST(TestIsMD5) { UNIT_ASSERT_EQUAL(false, MD5::IsMD5(TStringBuf())); - UNIT_ASSERT_EQUAL(false, MD5::IsMD5(TStringBuf("4136ebb0e4c45d21e2b09294c75cfa0"))); // length 31 - UNIT_ASSERT_EQUAL(false, MD5::IsMD5(TStringBuf("4136ebb0e4c45d21e2b09294c75cfa000"))); // length 33 - UNIT_ASSERT_EQUAL(false, MD5::IsMD5(TStringBuf("4136ebb0e4c45d21e2b09294c75cfa0g"))); // wrong character 'g' - UNIT_ASSERT_EQUAL(true, MD5::IsMD5(TStringBuf("4136EBB0E4C45D21E2B09294C75CFA08"))); - UNIT_ASSERT_EQUAL(true, MD5::IsMD5(TStringBuf("4136ebb0E4C45D21e2b09294C75CfA08"))); - UNIT_ASSERT_EQUAL(true, MD5::IsMD5(TStringBuf("4136ebb0e4c45d21e2b09294c75cfa08"))); + UNIT_ASSERT_EQUAL(false, MD5::IsMD5(TStringBuf("4136ebb0e4c45d21e2b09294c75cfa0"))); // length 31 + UNIT_ASSERT_EQUAL(false, MD5::IsMD5(TStringBuf("4136ebb0e4c45d21e2b09294c75cfa000"))); // length 33 + UNIT_ASSERT_EQUAL(false, MD5::IsMD5(TStringBuf("4136ebb0e4c45d21e2b09294c75cfa0g"))); // wrong character 'g' + UNIT_ASSERT_EQUAL(true, MD5::IsMD5(TStringBuf("4136EBB0E4C45D21E2B09294C75CFA08"))); + UNIT_ASSERT_EQUAL(true, MD5::IsMD5(TStringBuf("4136ebb0E4C45D21e2b09294C75CfA08"))); + UNIT_ASSERT_EQUAL(true, MD5::IsMD5(TStringBuf("4136ebb0e4c45d21e2b09294c75cfa08"))); } Y_UNIT_TEST(TestMd5HalfMix) { |