I am trying to encrypt a text file and save the encrypted file in the disk. Then, use the encrypted file to decrypt and write the contents back to another text file. For the encryption / decryption, I am using the NAV codeunit 824 Encryption Mgt. functions. Although the encryption part seems to work, but when I try to decrypt the file, I get the following error:
This message is for C/AL programmers: A call to Microsoft.Dynamics.Nav.Encryption.RSAMachineKeyProvider.Decrypt failed with this message: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
Do anyone have any idea on working with encryption / decryption in NAV 2013 ?
0
Answers
No, I am using a text variable only. That is why I am confused why the system throws this error
How did you manage to encrypt a text file ?, i am trying to encrypt a text with n line no's of records and also when i am decrypt the file, system throws an error "Unable to decrypt data. The data was encrypted using a different key.".