abstract class MSBLOB (View source)

Microsoft BLOB Formatted RSA Key Handler

Constants

PRIVATEKEYBLOB

Public/Private Key Pair

PUBLICKEYBLOB

Public Key

PUBLICKEYBLOBEX

Public Key

CALG_RSA_KEYX

RSA public key exchange algorithm

CALG_RSA_SIGN

RSA public key exchange algorithm

RSA1

Public Key

RSA2

Private Key

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