Jump to content
Sign in to follow this  
masvil

_StringEncrypt problem

Recommended Posts

masvil

$file = FileOpen("test.txt", 1)

$enc = _StringEncrypt(1, "Line1", $pw)
FileWrite($file, $enc)
$enc = _StringEncrypt(1, "Still Line1" & @CRLF, $pw)
FileWrite($file, $enc)
$enc = _StringEncrypt(1, "Line2", $pw)
FileWrite($file, $enc)

FileClose($file)

How can I get I decrypt test.txt?

This doesn't work:

$file = FileOpen("test.txt", 0)
While 1
   $line = FileReadLine($file)
   If @error = -1 Then ExitLoop
   $file2 = FileOpen("test2.txt", 1)
   $dec = _StringEncrypt(0, $line, $pw)
   FileWriteLine($file2, $dec)
   FileClose($file2)
WEnd
FileClose($file)

Share this post


Link to post
Share on other sites
masvil

OK, I've replaced FileWrite with FileWriteLine and it works :lmao:

Thanx

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  

×