Search code examples
.netphpsnk

How do I use snk file to sign data in PHP?


How to convert the .snk RSA keypair file used to sign the .NET assemblies to XML based files that can be used with PHP or other software?

XML file sample:

<BitStrength>1024</BitStrength><RSAKeyValue><Modulus>tk=</Modulus><Exponent>QB</Exponent></RSAKeyValue>

Solution

  • You have to convert your snk file to PEM format and use the openssl functions to encrypt.