/* * 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); }