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++ ?
What do you mean by "how should be the Public key"?
Martin , I used BouncyCastle and created on C# project library:-
Then I add this as a referenced to FO project and called this Dll method,
I suspecting about these 3 parameters ( highlighted yellow) , Can you please guide me how should be the Public key that i should try for testing?
No, it's not. Do you see any PGP keys used in the example? If not, how could it be about PGP? BouncyCastle supports many different encryption algorithms, not just PGP, therefore you can't assume that everything you find about BouncyCastle is related to PGP. Look at PgP Encryption and Decryption using BouncyCastle c# instead.
Also note that this was just an example. There are likely more libraries that you could use.
Thanks Martin and Nuno .
I found this link that using Bouncy Castle . Can you please suggest is this example of PGP encryption??
I never used BouncyCastle, but Martin suggestion might be a better solution for you.
Azure function it is an HTTP endpoint that is executed from F&O.
docs.microsoft.com/.../functions-create-your-first-function-visual-studio
Also note that there are .NET Framework libraries you could use, such as BouncyCastle.
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?
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
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
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Andrés Arias as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Sohaib Cheema 789 User Group Leader
André Arnaud de Cal... 607 Super User 2025 Season 2
Martin Dráb 497 Most Valuable Professional