Jump to content

_StringEncrypt problem


masvil
 Share

Recommended Posts

$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)
Link to comment
Share on other sites

  • Developers

You will have to decrypt the same length as you encrypted.......

Why not write each encrypted string on a seperate line ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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