web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

file encryption and decryption in AX 2012

(0) ShareShare
ReportReport
Posted on by

Hi All,

Hope you are doing good. I am working on one functionality for file import but now encryption and decryption has included in that.

Earlier my bank was sending the file in XML format which was coming into one folder. I was perfectly able to read and import the data into my tables. But now bank has encrypted those files with PGP key and sending it.

So now bank is sending two things- 1. encrypted file with PGP extension and 2. The PGP key.

I am not sure how to use the PGP key and files to decrypt into AX 2012 using X++. If anyone can give me some idea would be great.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 on at

    You should probably install a PGP library and run one of the binaries with command line options to decrypt the .pgp file into the original file.  Depending on the PGP library that you download, the command line will be different.

  • Community Member Profile Picture
    on at

    Thanks Brandon for the reply. Do you have any sample code piece for this ?

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    This is already the fourth thread with the same question. Please, don't make extra work for moderators - if they didn't have to clean up such a mess, they would have more time for answering your questions.

    See my reply in your thread on DUG forum.

  • Brandon Wiese Profile Picture
    17,788 on at

    I like Martin's answer better.  Using a .NET library directly from X++ using the Interop is a much cleaner solution, and that direct interaction with the library will let you detect errors and problems directly in your code, where dealing with errors from an external binary is far more challenging.

  • Community Member Profile Picture
    on at

    Hi Martin,

    I honor you suggestion. I'll remove unwanted multiple threads .

    The DUG forum website is down so I thought of communicating here .

    Your reply is  "I would pick a .NET library for PGP, such as Bouncy Castle, and call it from X++ via .NET Interop."

    But I think If we are using the open source libraries like Bouncy castle or any other like

    www.didisoft.com/net-openpgp

    gist.github.com/.../8323431

    but the concerns are as below -

    1. As those are the open source DLLs, is it Ok to download them on server and put them in a directory as it can contain some virus or bad files and can be a security risk.

    2. As we will use these files to decrypt our actual credit card information, it means we are revealing the sensitive information with open world.

    So now we are planning that Bank will send a zipped and password protect  file and we will do it unzipped and decrypt with password.

    Is it possible to use above approach to unzip and decrypt a file with password in Dynamics AX?

    Or do you have some other approach ?

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    If you prefer closed-source code (that you can't review), you are free to buy one of commercial libraries for encryption.

    Unfortunately I didn't get what you mean by "we are revealing the sensitive information with open world".

    Yes, it's possible to use zipped files - I would again use a .NET library (some APIs are already in the standard .NET framework). Nevertheless if you wanted to use PGP, why do you now want to give it up and use symmetric encryption instead (as you description seems to suggest)? Note that you can encrypt even ZIP files with PGP.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans