how do i convert RSAParameters from .net to .pem file so i can use it in php
- by netuser24
Hello i have a private and public keys for RSA generated in .net
in this format
string privateKey = "<RSAKeyValue>" +
"<Modulus>...kCFhsjB4xMW49mrx5B/Ga...</Modulus>" +
"<Exponent>...</Exponent>" +
"<P>...7bRCrQVgVIfXdTIH3iY8x...</P>" +
"<Q>...4SiQDhrAZADuFDTr7bRCrQVgVIfXdTIH3iY8x...</Q>" +
"<DP>...ZADuFDTr7bRCrQVgVIfXdT...</DP>" +
"<DQ>...4SiQDhrAZADuFDTr...</DQ>" +
"<InverseQ>...sjB4xMW49mrx5B/Ga...</InverseQ>" +
"<D>...SiQDhrAZADuFDTr7bRCrQVgVIf...</D>" +
"</RSAKeyValue>";
how can i convert this so i can use it in php openssl functions to encrypt and decrypt data?
i need both public and private keys converted.
maybe with openssl bash command in linux where can i specify my own modulus, exponent and so on?
any ideas?
thanks