phpseclib\Crypt\RSA\PKCS8::savePublicKey PHP Метод

savePublicKey() статический публичный Метод

Convert a public key to the appropriate format
static public savePublicKey ( phpseclib\Math\BigInteger $n, phpseclib\Math\BigInteger $e ) : string
$n phpseclib\Math\BigInteger
$e phpseclib\Math\BigInteger
Результат string
    static function savePublicKey(BigInteger $n, BigInteger $e)
    {
        $key = PKCS1::savePublicKey($n, $e);
        $key = ASN1::extractBER($key);
        return self::wrapPublicKey($key, '1.2.840.113549.1.1.1');
    }