Jump to content

encrypt decrypt help


Recommended Posts

can any one tell me y my script takes so long to decrypt a file

it happens on files bigger than 30kb

thanks

encrypt:

CODE

#include <file.au3>

#include <string.au3>

$file = FileOpenDialog("",@scriptdir,"txt(*.txt)")

$pass = inputbox("pass","pass","")

Dim $aRecords

If Not _FileReadToArray($file,$aRecords) Then

MsgBox(4096,"Error", " Error select a file error:" & @error)

Exit

EndIf

For $x = 1 to $aRecords[0]

$ran = Random(1,1000)

$str = _StringEncrypt(1,$aRecords[$x],$pass,$ran)

FileWrite(@ScriptDir & "\" & "randome numbers.txt",$ran & ",,")

FileWrite($file & ".enc",$str & @CRLF)

Next

decrypt:

CODE

#include <file.au3>

#include <string.au3>

$file = FileOpenDialog("",@scriptdir,"enc(*.enc)")

$ranfile = FileOpenDialog("",@scriptdir,"random(randome numbers.txt)")

$pass = inputbox("pass","pass","")

Dim $aRecords

dim $ranfile1

If Not _FileReadToArray($file,$aRecords) Then

MsgBox(4096,"Error", " Error select file error:" & @error)

Exit

EndIf

If Not _FileReadToArray($ranfile,$ranfile1) Then

MsgBox(4096,"Error", " Error read random number error:" & @error)

Exit

EndIf

For $x = 1 to $aRecords[0]

$ran = StringSplit($ranfile1,",")

$str = _StringEncrypt(0,$aRecords[$x],$pass,$ran)

FileWrite($file & "dev",$str )

Next

thanks

Edited by 7h331337
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...