This is a C#.NET based console application to convert public and private keys between XML and PEM format, either way.
You will need .NET 6 SDK to build and run this application.
First option is to obtain PEM string from XML. Paste the XML that you have in xmlFile.xml before running the program.
Second option is to obtain XML string from PEM. Paste the PEM key in pemFile.pem before running the program.
I was inspired by this website to make this project. Code take from GitHub Gist.
To be honest, the only reason I made this was because I didn't want to broadcast keys that I convert on the internet so wanted to make a local solution but all code and logic credits to them.