Powershell : creating your PEM on DevOps pipeline



Sometimes you might want to create expose your public key / generate your public key to 3rd party apps. This is a code written entirely on Powershell to help you export public key (modulus and exponent) to a legit PEM file:

To use it,


$pemPublicKey = GeneratePublicKey $your_modulus_base64encoded 
$your_exponent

Write-Host($pemPublicKey)






Comments

Tokuro said…
nice one. thx. :-)

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm