PGP file encryption and decryption

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.

Regards

Anuj

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

Hi Martin,

Is there any step by step documentation available to use PGP encryption with files generated from AX

Raj

It would be a custom development; such things are not covered by AX documentation. What you can find there, though, is more information about .NET Interop.
You can find information about how to use particular frameworks (such as s Bouncy Castle mentioned above) in their documentation, not in AX documentation.

Thanks Martin for your response, Custom development you mean customization within frameworks (Such as Bouncy Castle)? Are there any such examples where such customization is already done? or Can I refer to some article or blog from where I can get more details which would help me to move in the right direction to achieve this?

Your help is highly appreciated…

No, not within frameworks. I’m saying you should merely call an existing framework from your AX code, not that you should modify a .NET framework.

If such a customization has been already done, it’s in some customer’s codebase, therefore not accessible to us.

Regarding to blog posts, try using a search engine, but it’s not a common thing to do, so I don’t know if you can find anything specific to AX. A more reasonable approach is learning how to use one of the frameworks in .NET and then simply use .NET Interop to call it from X++, as I mentioned in my first reply.