mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-31 21:21:55 +00:00
AsymmetricKey: make more methods static
This commit is contained in:
parent
a19c6ab7e6
commit
12864bd9f6
@ -198,7 +198,7 @@ abstract class AsymmetricKey
|
|||||||
* @param string|array $key
|
* @param string|array $key
|
||||||
* @param string $password optional
|
* @param string $password optional
|
||||||
*/
|
*/
|
||||||
public function loadPrivateKey($key, $password = '')
|
public static function loadPrivateKey($key, $password = '')
|
||||||
{
|
{
|
||||||
$key = self::load($key, $password);
|
$key = self::load($key, $password);
|
||||||
if (!$key instanceof PrivateKey) {
|
if (!$key instanceof PrivateKey) {
|
||||||
@ -214,7 +214,7 @@ abstract class AsymmetricKey
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string|array $key
|
* @param string|array $key
|
||||||
*/
|
*/
|
||||||
public function loadPublicKey($key)
|
public static function loadPublicKey($key)
|
||||||
{
|
{
|
||||||
$key = self::load($key);
|
$key = self::load($key);
|
||||||
if (!$key instanceof PublicKey) {
|
if (!$key instanceof PublicKey) {
|
||||||
@ -230,7 +230,7 @@ abstract class AsymmetricKey
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string|array $key
|
* @param string|array $key
|
||||||
*/
|
*/
|
||||||
public function loadParameters($key)
|
public static function loadParameters($key)
|
||||||
{
|
{
|
||||||
$key = self::load($key);
|
$key = self::load($key);
|
||||||
if (!$key instanceof PrivateKey && !$key instanceof PublicKey) {
|
if (!$key instanceof PrivateKey && !$key instanceof PublicKey) {
|
||||||
|
Loading…
Reference in New Issue
Block a user