Jump to content

ROT 256 - encryption, decryption


Nuffilein805
 Share

Recommended Posts

i was bored so i made a ROT-256 encryption/decryption

don't know if anyone already made 1

THIS 1 IS NOT SAFE!

if you want to use it, do it on your own risk!

anyway, here's the code

;rot-256
$a = InputBox ("Test", "Text eingeben")
$b = rot_256 ($a)
msgbox (0, $a, $b)

func rot_256($string)
    $letter = StringSplit ($string, "")
    $max = $letter[0] + 1
    dim $output[$max]
    dim $convert[$max]
    dim $rot_256 = ""
    for $i = 1 to $letter[0] step 1
        $convert[$i] = Asc($letter[$i])
        if $convert[$i] > -1 and $convert[$i] < 128 Then
            $convert[$i] = $convert[$i] + 128
            $output[$i] = Chr($convert[$i])
        ElseIf $convert[$i] > 127 and $convert[$i] < 256 Then
            $convert[$i] = $convert[$i] - 128
            $output[$i] = Chr($convert[$i])
        EndIf
        $rot_256 = $rot_256 & $output[$i]
    Next
    
    return $rot_256
            
EndFunc

added a little testthingy

rot_256.au3

Edited by Nuffilein805
Link to comment
Share on other sites

Was bored too so i wrote a decrypt script and modified the encript one, now it writes the output to a file (the decrypt one does that too)^^

The files are here: http://www.autoitscript.com/fileman/users/tdlrali/Some_random_stuff/

Definately not safe, all I had to do to decrypt is change two (2^^) signs:

+ -> - / - -> +

Still kind of fun since it looks cool!

Felix N.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...