Options

Does anyone has any idea on how the Navision encrypt / decrypt works in NAV 2013 ?

dipanwita_cdipanwita_c Member Posts: 11
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 ?

Answers

  • Options
    QWERT_QWERT_ Member Posts: 13
    Could the problem maybe be that you are trying to use Decryption on something else than a Text variable? Its seems that the method expects a variable of type Text (or Base-64 String).
  • Options
    dipanwita_cdipanwita_c Member Posts: 11
    Hi !
    No, I am using a text variable only. That is why I am confused why the system throws this error
  • Options
    aditya_mandavaditya_mandav Member Posts: 2
    Hi Dipanwita

    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.".
  • Options
    CodeViperCodeViper Member Posts: 28
    no answer on this :( running into this exact issue today... all i am looking for is a simple 'jumble/encryption' so prying eyes cant read the UserName...
Sign In or Register to comment.