76 views

Password based encription script

Filed under: Scripts

This is a very nifty script i made up some time ago, what it does is to encript a given string (argument0) with a given password (argument1), it obviously returns the encripted string.

/*
Encription basic code:
-Arg0 = String
-Arg1 = Password
 
-Return = Cripted string
 
By Manuel Etchegaray
*/
var n,nn,ch,r,ok,chp;
r = ""
for (n=1; n < string_length(argument0)-1; n+=1)
 {
  ch = ord(string_char_at(argument0,n))
  ok = 0
  for (nn=1; nn < string_length(argument1)+1; nn+=1)
   {
    chp = round(ord(string_char_at(argument1,nn))/nn)
    if n/nn = ceil(n/nn) and ok = 0
     {
      r += chr(ch+chp)//To decript, just change this for: chr(ch-chp)
      ok = 1
     }
   }
  if ok = 0
   {
    chp = ord(string_char_at(argument1,nn))
    r += chr(ch+chp)//To decript, just change this for: chr(ch-chp)
   }
 }
return (r)

What it does exactly? it goes trough the whole string with a ‘for’ loop, changing the ASCII values of the characters based on the password ASCIII values (a simple password+character algorithm). This might sound simple, but i found it really hard to break ( if not impossible ), since you need to know the passoword to decript the text :)

Download GML file

VN:F [1.9.3_1094]
Rating: 5.0/5 (2 votes cast)
Password based encription script, 5.0 out of 5 based on 2 ratings
Share:
  • LinkedIn
  • Digg
  • del.icio.us
  • N4G
  • Reddit
  • Twitter
  • Facebook

Tags:

Permalink Comments (0) Manuel777 Jul 4, 2010

Leave a Reply

 


page counter