abstract class XML (View source)

XML Formatted RSA Key Handler

Methods

static array
load(string $key, string $password = '')

Break a public or private key down into its constituent components

static string
savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, string $password = '')

Convert a private key to the appropriate format.

static string
savePublicKey(BigInteger $n, BigInteger $e)

Convert a public key to the appropriate format

Details

static array load(string $key, string $password = '')

Break a public or private key down into its constituent components

Parameters

string $key
string $password optional

Return Value

array

static string savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, string $password = '')

Convert a private key to the appropriate format.

Parameters

BigInteger $n
BigInteger $e
BigInteger $d
array $primes
array $exponents
array $coefficients
string $password optional

Return Value

string

static string savePublicKey(BigInteger $n, BigInteger $e)

Convert a public key to the appropriate format

Parameters

BigInteger $n
BigInteger $e

Return Value

string