Jump to content

Crypting


jaenster
 Share

Recommended Posts

This is a crypt function, its fast and short in code, and really strong..

Maby i remake it in php

#INCLUDE <STRING.AU3>
$text = "This is my text i want to encrypt"
$password = "This is my secret password "
$Cryped = Crypt($text,$password,0)
consolewrite($Cryped&@crlf)
$Decrypt= crypt($Cryped,$password,1)
consolewrite($Decrypt&@crlf)

func crypt($t,$pw,$type)
    if $type = 1 then $t = _HexToString($t)
    $Terug = ""
    $pwlen=stringlen($password)
    $textlen = stringlen($t)
    dim $text[$textlen+1]
    for $z = 1 to $pwlen
        for $i = 1 to $textlen
            $text[$i] = hex(bitxor(asc(stringmid($t,$i,1)),asc(stringmid($pw,$z,1))),2)
        next
    next
    for $i = 1 to ubound($text)-1
        if $type =1 then $terug &= chr(dec($text[$i]))
        if $type <> 1 then  $terug &= $text[$i]
    next
    return $Terug
endfunc

Edit : Updated the code

Edited by jaenster

-jaenster

Link to comment
Share on other sites

Hey, cool crypter! I tried to make one once, ended up turning it into a binary - text translator. Cryptology is a really cool topic, and there are some pretty involved algorithms is use out there these days. I still don't quite understand how to undo the ones that use random strings in random places, then randomly scramble it... I don't see how that could be undone. I also heard somewhere (don't remember from whom) that there were algorithms that were so complex that the government made them illegal because they couldn't figure out how to break them... lol.

- Dan [Website]

Link to comment
Share on other sites

Hey, cool crypter! I tried to make one once, ended up turning it into a binary - text translator.

That's what happend to mine! :P

Nice encryptor. I like it!

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

Hey, cool crypter! I tried to make one once, ended up turning it into a binary - text translator. Cryptology is a really cool topic, and there are some pretty involved algorithms is use out there these days. I still don't quite understand how to undo the ones that use random strings in random places, then randomly scramble it... I don't see how that could be undone. I also heard somewhere (don't remember from whom) that there were algorithms that were so complex that the government made them illegal because they couldn't figure out how to break them... lol.

you mean like md5? I'm pretty sure md5 can't be correctly decrypted....or am I wrong?

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Just crazy that something can be encrypted, I don't want to go in paranoïa but - well

I use this pretty program which is just crazy speedy, sure it's not in au3 :D

The link : http://www.ruskwig.com/random_encryption.htm

There is an explanation on how it works ... :P

I don't think it's the same like this script, if not why not making a challenge in re-creating it in au 3

Link to comment
Share on other sites

you mean like md5? I'm pretty sure md5 can't be correctly decrypted....or am I wrong?

Indeed, that's incorrect. MD5 isn't an encryption algorithm in the first place, so there is nothing to decrypt. MD5 is a hash algorithm, and is meant to be a one-way operation. Edited by -Ultima-

[ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ]

Link to comment
Share on other sites

Indeed, that's incorrect. MD5 isn't an encryption algorithm in the first place, so there is nothing to decrypt. MD5 is a hash algorithm, and is meant to be a one-way operation.

ah, i see. thank you.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

  • 1 month later...
  • Moderators

Is there a way of decrypting it once it has been crypted? I can see how it crypts it... but How would I make a func to decrypt it?

I must be tired. :)

You send the encrypted source along with $24.95 to me :D

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Is there a way of decrypting it once it has been crypted? I can see how it crypts it... but How would I make a func to decrypt it?

I must be tired. :)

Created a new crypt function for you.

And it works faster.

I also updated the main script

#INCLUDE <STRING.AU3>
$text = "This is my text i want to encrypt"
$password = "This is my secret password "
$Cryped = Crypt($text,$password,0)
consolewrite($Cryped&@crlf)
$Decrypt= crypt($Cryped,$password,1)
consolewrite($Decrypt&@crlf)

func crypt($t,$pw,$type)
    if $type = 1 then $t = _HexToString($t)
    $Terug = ""
    $pwlen=stringlen($password)
    $textlen = stringlen($t)
    dim $text[$textlen+1]
    for $z = 1 to $pwlen
        for $i = 1 to $textlen
            $text[$i] = hex(bitxor(asc(stringmid($t,$i,1)),asc(stringmid($pw,$z,1))),2)
        next
    next
    for $i = 1 to ubound($text)-1
        if $type =1 then $terug &= chr(dec($text[$i]))
        if $type <> 1 then  $terug &= $text[$i]
    next
    return $Terug
endfunc

-jaenster

Link to comment
Share on other sites

  • 1 month later...

Is there a way of decrypting it once it has been crypted? I can see how it crypts it... but How would I make a func to decrypt it?

I must be tired. :whistle:

Hmm, just came along this topic... Just in case you are haven't been eating or sleeping for the past couple of weeks pondering this question (and to make sure you won't pay Smoke because I need the money more! :P): you don't seem to NEED to make a function for decrypting, because believe it or not but an example how to decrypt it can be found in the 6th line of the code :D

Sorry for this useless post, I must be tired too! :lmao:

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
Share on other sites

  • 3 weeks later...

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...