Add getSize() function to Crypt_RSA

This commit is contained in:
terrafrost 2012-10-07 18:53:26 -05:00
parent 7d1e714a08
commit 7ba006ccdc

View File

@ -1228,6 +1228,19 @@ class Crypt_RSA {
}
}
/**
* Returns the key size
*
* More specifically, this returns the size of the modulo in bits.
*
* @access public
* @return Integer
*/
function getSize()
{
return !isset($this->modulus) ? 0 : strlen($this->modulus->toBits());
}
/**
* Start Element Handler
*