Sign in to follow this  
Followers 0
7h331337

encrypt decrypt help

5 posts in this topic

#1 ·  Posted (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 by 7h331337

Share this post


Link to post
Share on other sites



$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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

i no 1 to 1000 is massssiv but thats good encryption lol

i gues just dont use it for big files lol thanks

Share this post


Link to post
Share on other sites

_StringEncrypt

Remarks

WARNING: This function has an extreme timespan if the encryption level or encrypted string are too large!

Share this post


Link to post
Share on other sites

_StringEncrypt

Remarks

WARNING: This function has an extreme timespan if the encryption level or encrypted string are too large!

oye thanks i forgot abt that

Share this post


Link to post
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
Sign in to follow this  
Followers 0