Sign in to follow this  
Followers 0
t0ddie

_fileencrypt

5 posts in this topic

if i only go through a loop once, like so. this works.

scenerio:1

#include <string.au3>
$text = "yeah"
$test = FileOpen("test.txt",1)
For $x = 1 to 1
FileWrite($test,_StringEncrypt(1,$text,"pass321",1))
Next
FileClose($test)

i decrypt the encryption and i get "yeah"

but if i make the loop run more than once... like so.. this doesnt work.

scenerio: 2

#include <string.au3>
$text = "yeah"
$test = FileOpen("test.txt",1)
For $x = 1 to 5
FileWrite($test,_StringEncrypt(1,$text,"pass321",1))
Next
FileClose($test)

i decrypt the encryption and i get "yeah÷6Þ)pÉìH5Ûôîñ-"

i didnt know this would happen because i thought i tested for bugs before i deleted the decypted info (i tested _fileencrypt but not in a loop) and i have some information incrypted already that i cant retrieve through decryption B)

is there a way to properly decrypt scenerio: 2???


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites



Hi!

Perhaps you should use FileWriteLine?

peethebee


vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Share this post


Link to post
Share on other sites

tried it, doesnt work


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

You don't show your decryption code but my guess would be that you try to decrypt it with one _StringEncrypt(0,$text,"pass321",1) ...

You need to decrypt each Encrypted string individually !

In other words: you need the same For...Next loop for decryption.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

thanks


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

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