repeating key xor

This commit is contained in:
2024-04-09 10:47:34 -07:00
parent 507c690583
commit 321d1ec446
4 changed files with 42 additions and 3 deletions

View File

@ -361,6 +361,12 @@ void test_crypto() {
assert(strcmp(s, "Sup?") == 0);
free(s);
s = repeating_key_xor_s("TEST", "HI");
const char *enc = hex_encode(s, 4);
assert(strcmp(enc, "1C0C1B1D") == 0);
free(enc);
free(s);
printf("Passes all crypto tests\n");
}