Default of Magicsig keypair toString should be secure

Prevent crappy coders from leaking private keys.
This commit is contained in:
Mikael Nordfeldth
2014-06-03 12:51:52 +02:00
parent 629cbedee2
commit aaef11077d
2 changed files with 3 additions and 3 deletions

View File

@@ -169,10 +169,10 @@ class Magicsig extends Managed_DataObject
/**
* Encode the keypair or public key as a string.
*
* @param boolean $full_pair set to false to leave out the private key.
* @param boolean $full_pair set to true to include the private key.
* @return string
*/
public function toString($full_pair = true)
public function toString($full_pair=false)
{
$mod = Magicsig::base64_url_encode($this->publicKey->modulus->toBytes());
$exp = Magicsig::base64_url_encode($this->publicKey->exponent->toBytes());