Skip to content

Commit

Permalink
Revert "unittests/hashs: Fixed wrong string length"
Browse files Browse the repository at this point in the history
Created separate PR (RIOT-OS#20165)

This reverts commit 055471a.
  • Loading branch information
fzi-haxel committed Dec 12, 2023
1 parent fdaaab9 commit 8ae1f0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unittests/tests-hashes/tests-hashes-sha512.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ static void test_hashes_sha512_hash_update_twice(void)
sha512_context_t sha512;

sha512_init(&sha512);
sha512_update(&sha512, (uint8_t*)teststring, strlen(teststring));
sha512_update(&sha512, (uint8_t*)teststring, sizeof(teststring));
sha512_final(&sha512, hash_update_once);

sha512_init(&sha512);
sha512_update(&sha512, (uint8_t*)teststring, 3);
sha512_update(&sha512, (uint8_t*)&teststring[3], strlen(teststring)-3);
sha512_update(&sha512, (uint8_t*)&teststring[3], sizeof(teststring)-3);
sha512_final(&sha512, hash_update_twice);

TEST_ASSERT(memcmp(hash_update_once, hash_update_twice, SHA512_DIGEST_LENGTH) == 0);
Expand Down

0 comments on commit 8ae1f0e

Please sign in to comment.