mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
Add getSize() function to Crypt_RSA
This commit is contained in:
parent
7d1e714a08
commit
7ba006ccdc
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user