Encryption or AREV (General)
At 11 MAY 2010 10:52:24AM John Bouley wrote:
I have written an Encryption routine for AREV and seems to encrypt/decrypt just fine but I would like a second opinion.
Can anyone comment on the viability of this code? Thanks.
Seed=someseedvalue
STATUS()=VALID$RETURN_DATA=ANSBEGIN CASECASE CONV=ICONV'ansLen=len(ans)return_Data='for i=1 to ansLenxorVal1=seq(ansi,1)xorVal2=seq(seedmod(i,len(seed))+1,1)tempString=bitxor(xorVal1, xorVal2)tempString=oconv(tempString,"MX")if len(tempString)=1 then tempString=0" : tempStringreturn_Data := tempStringnext iCASE CONV=OCONV'ansLen=len(ans) / 2Return_Data='for i=1 to ansLenxorVal1= iconv(ans(2*i)-1,2,"MX")xorVal2=seq(seedmod(i, len(seed))+1,1)tempString=bitxor(xorVal1,xorVal2)return_Data := char(tempString)next iEND CASE