mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-25 19:21:09 +00:00
AsymmetricKey: make methods static
This commit is contained in:
parent
b32ffb64b8
commit
a5fcb44e28
@ -280,7 +280,7 @@ abstract class AsymmetricKey
|
|||||||
* @param string $key
|
* @param string $key
|
||||||
* @param string $password optional
|
* @param string $password optional
|
||||||
*/
|
*/
|
||||||
public function loadPrivateKeyFormat($type, $key, $password = false)
|
public static function loadPrivateKeyFormat($type, $key, $password = false)
|
||||||
{
|
{
|
||||||
$key = self::loadFormat($type, $key, $password);
|
$key = self::loadFormat($type, $key, $password);
|
||||||
if (!$key instanceof PrivateKey) {
|
if (!$key instanceof PrivateKey) {
|
||||||
@ -297,7 +297,7 @@ abstract class AsymmetricKey
|
|||||||
* @param string $type
|
* @param string $type
|
||||||
* @param string $key
|
* @param string $key
|
||||||
*/
|
*/
|
||||||
public function loadPublicKeyFormat($type, $key)
|
public static function loadPublicKeyFormat($type, $key)
|
||||||
{
|
{
|
||||||
$key = self::loadFormat($type, $key);
|
$key = self::loadFormat($type, $key);
|
||||||
if (!$key instanceof PublicKey) {
|
if (!$key instanceof PublicKey) {
|
||||||
@ -314,7 +314,7 @@ abstract class AsymmetricKey
|
|||||||
* @param string $type
|
* @param string $type
|
||||||
* @param string|array $key
|
* @param string|array $key
|
||||||
*/
|
*/
|
||||||
public function loadParametersFormat($type, $key)
|
public static function loadParametersFormat($type, $key)
|
||||||
{
|
{
|
||||||
$key = self::loadFormat($type, $key);
|
$key = self::loadFormat($type, $key);
|
||||||
if (!$key instanceof PrivateKey && !$key instanceof PublicKey) {
|
if (!$key instanceof PrivateKey && !$key instanceof PublicKey) {
|
||||||
|
Loading…
Reference in New Issue
Block a user