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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Encrypt Vendor Payment File with PGP security

(0) ShareShare
ReportReport
Posted on by 4,624

Hey ,

I am generating Vendor payment file through electronic reporting. It is an xml file , i want it to be encrypted with PGP Encryption. Can you please suggest how do that using in X++ ? 

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    305,860 Super User 2026 Season 1 on at

    Hi Rohin,

    In the past, I heard the option to use a third-party component to do the PGP encryption. You can e.g. have a look here www.nuget.org/.../1.2.0

  • Suggested answer
    nunomaia Profile Picture
    27 Moderator on at

    Last project that I have made, we exported payment file from  electronic reporting files to a Azure Blob Storage. Then encrypted data with PGP with Azure functions. PgpCore runs on .NET Core and also needs additional permissions in file systems. It was easy to manage PGP encryption outside D365 due to this restrictions.  

  • Rohin Profile Picture
    4,624 on at

    Thanks Andre and Nuno. However, I was wondering that doesn't D365 FO has out of box classes for Encryption (Cryptography API ) ?? or it has another purpose??

  • Suggested answer
    nunomaia Profile Picture
    27 Moderator on at

    out out the box, NET provides many standard cryptographic algorithms. For PGP you must third party library because isn't implemented in .NET Framework.    

  • Rohin Profile Picture
    4,624 on at

    Thanks Nuno

    @Andre - This  PGPCORE library looks like is not compatible with Visual studio 2015 , its not opening. I saw it will be for VS2017 , please suggest

  • Martin Dráb Profile Picture
    239,874 Most Valuable Professional on at

    PgpCore is for .NET Core and it can't be loaded to .NET Framework applications such as D365FO. I suspect it's what you're trying to do.

    Nuno suggested something else - using it in Azure Functions.

    Visual Studio 2015 doesn't support .NET Core development, therefore use a newer version for this purpose.

  • Rohin Profile Picture
    4,624 on at

    Martin , I have to Encrypt payment file while its getting generated from D365FO.

    Moreover , Encryption using Azure functions is something outside from D365FO ? I would like to know about this as well , please elaborate more

  • Suggested answer
    nunomaia Profile Picture
    27 Moderator on at

    Azure functions runs outside D365 F&O, it’s a simple way to run processes, etc.  that cannot be executed inside F&O. For example I already used Azure functions with F&O to export payment files to Bank’s SFTP, encrypt data with PGP, etc.

    Not all is possible to perform inside F&O.

    What you can do ( just an example ), there are other possibilities  

    1 - Export payment files from Electronic Reporting to Azure Blob storage.

    2 - After exporting, inside F&O, execute an Azure Function to encrypt data ( read from Blob Storage and write back to Azure Storage ).

    3 - Read Result from F&O

  • Rohin Profile Picture
    4,624 on at

    Thanks Nuno , I wanna understand more about point 2 . How to execute Azure function for PGP Encryption using X++ ?  Would you please redirect me to some examples you wanna share?

  • Martin Dráb Profile Picture
    239,874 Most Valuable Professional on at

    Also note that there are .NET Framework libraries you could use, such as BouncyCastle.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 461 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 428

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans