fix tests

This commit is contained in:
Evan Burkey 2024-04-09 14:24:16 -07:00
parent 70bb4644e2
commit 60e2715e19
2 changed files with 3 additions and 3 deletions

View File

@ -264,4 +264,4 @@ const unsigned char* repeating_key_xor(const unsigned char* s, size_t s_sz, cons
const unsigned char *repeating_key_xor_s(const char* s, const char* key) {
return repeating_key_xor((unsigned char*)s, strlen(s), (unsigned char*)key, strlen(key));
}
}

View File

@ -350,7 +350,7 @@ void test_crypto() {
free(s);
s = hex_encode(h, 4);
assert(strcmp(s, "DEADBEEF") == 0);
assert(strcmp(s, "deadbeef") == 0);
free(s);
// "Sup?"
@ -363,7 +363,7 @@ void test_crypto() {
s = repeating_key_xor_s("TEST", "HI");
const char *enc = hex_encode(s, 4);
assert(strcmp(enc, "1C0C1B1D") == 0);
assert(strcmp(enc, "1c0c1b1d") == 0);
free(enc);
free(s);