[Gambas-user] Cipher doesn't read ciphered text

T Lee Davidson t.lee.davidson at gmail.com
Tue Sep 29 15:18:08 CEST 2020

On 9/29/20 7:17 AM, Rolf-Werner Eilert wrote:
> I played around with Cipher, extending it by loading a small ASCII text file (2016 Bytes) with File.Load. The string is crypted 
> and when I want it decrypted, Gambas says "Decryption failed".
> A short string like "hello world" is ok, it does even accept umlauts. So, where's the problem? Too long? Unfortunately, the 
> documentation isn't complete and the error message doesn't say why.
> Regards
> Rolf

Does decryption fail if you explicitly set a string variable to the encrypted text instead of loading from a file?
How was the ASCII text file created?

I ask because some text editors can be set to add a newline at the end of a file if there is not one. Perhaps examine the text 
file with a hex editor, or try something like:
sEncryptedText = Trim(File.Load("encrypted.txt"))

If it's not that, can you provide an example project?


More information about the User mailing list