Welcome Guest [Log In] [Register]



Viewing Single Post From: Encryption
ari_aaron
Member Avatar
1a4
Root Administrator
This is my encryption script, which works very well, especialy considering that it is only 15 lines (including comment ans spaces). I am not even going to bother posting it on the GMC, because there are so many of them.

Encrypt:
Code:
 

//arg0: string to encrypt

len=string_length(argument0)

for(i=1;i!=len+1;i+=1)
{
letter[i]=string_char_at(argument0,i)
letter[i]=chr(ord(letter[i])+(i*2))
}
str=''
for(a=1;a!=len+1;a+=1)
{
str+=letter[a]
}
return str


Decrypt (change 1 char + comment :P):
Code:
 

//arg0: string to decrypt

len=string_length(argument0)

for(i=1;i!=len+1;i+=1)
{
letter[i]=string_char_at(argument0,i)
letter[i]=chr(ord(letter[i])-(i*2))
}
str=''
for(a=1;a!=len+1;a+=1)
{
str+=letter[a]
}
return str


Notice how it will be diffrent depending on the position, so you can't match that @=n or something like that.

What do you all think?

My msn: Posted Image
Posted Image
If anyone wants GMail or Windows Live Messenger invites, PM me!
Offline Profile Quote Post
Encryption · Extending Game Maker: DLLs, Scripts, and Libraries

Theme designed by Sith of Outline