7h331337 Posted July 13, 2008 Share Posted July 13, 2008 (edited) 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 July 13, 2008 by 7h331337 Link to comment Share on other sites More sharing options...
Valuater Posted July 13, 2008 Share Posted July 13, 2008 $ran = Random(1, 1000) encrypting to 1000 is a major depth and creates a length that is hhhhhhuuuuuggggeee.......if it works at all.. .... have you tried to open a file, under 30kb, after the encrypt/decrypt process? 8) Link to comment Share on other sites More sharing options...
7h331337 Posted July 13, 2008 Author Share Posted July 13, 2008 i no 1 to 1000 is massssiv but thats good encryption lol i gues just dont use it for big files lol thanks Link to comment Share on other sites More sharing options...
Pain Posted July 13, 2008 Share Posted July 13, 2008 _StringEncrypt Remarks WARNING: This function has an extreme timespan if the encryption level or encrypted string are too large! Link to comment Share on other sites More sharing options...
7h331337 Posted July 13, 2008 Author Share Posted July 13, 2008 _StringEncrypt RemarksWARNING: This function has an extreme timespan if the encryption level or encrypted string are too large!oye thanks i forgot abt that Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now