Skip to content

Instantly share code, notes, and snippets.

@lkdocs
Last active December 22, 2015 20:29
Show Gist options
  • Save lkdocs/6526712 to your computer and use it in GitHub Desktop.
Save lkdocs/6526712 to your computer and use it in GitHub Desktop.
<?
public function rsa_generate($bits=2048) {
$rsa = new Crypt_RSA();
define('CRYPT_RSA_EXPONENT', 65537);
$keypair = $rsa->createKey($bits);
return $keypair;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment