From eeac69b2168c5a65f9608771006ccc43033cbd23 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 7 May 2025 09:45:50 -0700 Subject: initial commit --- cstrobf.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 cstrobf.c (limited to 'cstrobf.c') diff --git a/cstrobf.c b/cstrobf.c new file mode 100644 index 0000000..743285d --- /dev/null +++ b/cstrobf.c @@ -0,0 +1,27 @@ +/* + * LOKI3 + * + * [ cstrobf.c ] + * + * 2019 and beyond Elective Surgery [dmfr] + */ + +#include "cstrobf.h" + + +char *decrypt(estring encrypted) { + int i; + char buf[CSTROBF_MAX] = {0}; + + for (i = 0; i < encrypted.size; i++) + buf[i] = encrypted.str[i] ^ encrypted.key[i % encrypted.ksize]; + + return strdup(buf); +} + + +void destroy(char *buf, size_t len) { + for(int i = 0; i < len; i++) + buf[i] = rand() % 256; + free(buf); +} -- cgit v1.2.3