06-09-2006, 09:43 AM
I was curious that sometimes when i decrypt a string, I get an error. The key is exactly the same each time, yet on some calls, it fails. I have ensured that the key is the exact same as the encrypt key.
for example:
If the function is executed too many times, even with a 3 second delay between calls, i will eventually get an error on the decrpyt function.
for example:
function str'myfun
str mystr.getmacro("counter")
mystr.decrypt(1 mystr "somekey")
int i=val(mystr)
if(i>5)
,some code
else
,some other code
i+1
mystr.format("%i" i)
mystr.encrypt(1 mystr "somekey")
mystr.setmacro("counter") ;; and i have tried newitem(...) as well.
myfun.format("The macro [%s] has been called %i times in its life" myfun i)
out myfun
ret 1
err+
,ret 0
If the function is executed too many times, even with a 3 second delay between calls, i will eventually get an error on the decrpyt function.