Skip to content

Instantly share code, notes, and snippets.

@ilius
Created December 23, 2015 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilius/4525b768aea31b567615 to your computer and use it in GitHub Desktop.
Save ilius/4525b768aea31b567615 to your computer and use it in GitHub Desktop.
<?php
include('Crypt/RSA.php');
$rsa = new Crypt_RSA();
$rsa->loadKey('<RSAKeyValue>
<Modulus>
...
</Modulus>
<Exponent>AQAB</Exponent>
<P>
...
</P>
<Q>
...
</Q>
<DP>
...
</DP>
<DQ>
...
</DQ>
<InverseQ>
...
</InverseQ>
<D>
...
</D>
</RSAKeyValue>');
$privatekey = $rsa->getPrivateKey();
//$publickey = $rsa->getPublicKey();
echo($privatekey);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment