Realize my 'fixed' XOR is already repeating-key
x1phosura x1phosura@x1phosura.zone
Wed, 27 Apr 2022 00:43:03 -0700
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
set1/src/fixed-xor.c
→
set1/src/repeating-key-xor.c
@@ -3,13 +3,13 @@ #include <stdio.h>
#include <stdlib.h> /* -void fixed_xor_stream(uint8_t *key, size_t key_len) +void repeating_key_xor_stream(uint8_t *key, size_t key_len) { // } */ -void fixed_xor(const uint8_t *data, const size_t data_len, +void repeating_key_xor(const uint8_t *data, const size_t data_len, const uint8_t *key, const size_t key_len) { uint8_t c;@@ -30,7 +30,7 @@ "\x53\x50\x09\x18\x1c\x00\x00\x00\x00\x00\x00\x00";
uint8_t key[] = "\x68\x69\x74\x20\x74\x68\x65\x20\x62\x75\x6c\x6c\x27" "\x73\x20\x65\x79\x65"; - fixed_xor(data, sizeof(data)-1, key, sizeof(key)-1); + repeating_key_xor(data, sizeof(data)-1, key, sizeof(key)-1); return EXIT_SUCCESS; }