masvil Posted January 27, 2006 Posted January 27, 2006 $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)
Developers Jos Posted January 27, 2006 Developers Posted January 27, 2006 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.
masvil Posted January 28, 2006 Author Posted January 28, 2006 OK, I've replaced FileWrite with FileWriteLine and it works Thanx
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