SolvedAjuda na base
Quais strings são essas que vocês falam para encriptar?
EDIT: Vi uns tópicos e saquei, mas tentei usar esse site que mandaram http://www.tutogames.xpg.com.br/xorgen.html, encriptei todas, vou compilar e diz que XorStr é indefinido. É necessário adicionar + alguma biblioteca ao código? Se sim, qual?
EDIT: Vi uns tópicos e saquei, mas tentei usar esse site que mandaram http://www.tutogames.xpg.com.br/xorgen.html, encriptei todas, vou compilar e diz que XorStr é indefinido. É necessário adicionar + alguma biblioteca ao código? Se sim, qual?
Cria um header com o nome Xor.h adiciona isso aqui
e onde você adiciona os itens do menu coloque
Code:
#ifndef _ENCRYPT_H_
#define _ENCRYPT_H_
template<INT XORSTART, INT BUFLEN, INT XREFKILLER>
class XorStr
{
private:
XorStr();
public:
char s[BUFLEN];
XorStr(CONST CHAR *xs);
~XorStr()
{
for (INT i = 0; i < BUFLEN; i++)
s[i] = 0;
}
};
template<INT XORSTART, INT BUFLEN, INT XREFKILLER>
XorStr<XORSTART, BUFLEN, XREFKILLER>::XorStr(CONST CHAR *xs)
{
int xvalue = XORSTART;
int i = 0;
for (; i < (BUFLEN - 1); i++)
{
s[i] = xs[i - XREFKILLER] ^ xvalue;
xvalue += 1;
xvalue %= 256;
}
s[BUFLEN - 1] = 0;
}
#endif
Code:
#include "Xor.h"
This thread is closed for replies.


