10-29-2009, 03:31 AM
First time I come across Cryptography using JAVA.
This is a basic XOR Encryption I get from the Internet.
I write the full code and use the method,it always give me an error regarding "return xorEnc(encKeyI,toEnc)".
After looking again at this return type function,find out that "xorEnc" is not declare.
Anyone know how to modified this code?
Thanks.
This is a basic XOR Encryption I get from the Internet.
Code:
public String xorEncStr(String encKey, String toEnc)
{
int t=0;
int encKeyI=0;
while(t < encKey.length())
{
encKeyI+=encKey.charAt(t);
t+=1;
}
return xorEnc(encKeyI,toEnc);
}
I write the full code and use the method,it always give me an error regarding "return xorEnc(encKeyI,toEnc)".
After looking again at this return type function,find out that "xorEnc" is not declare.
Anyone know how to modified this code?
Thanks.