PHP Class Jose\KeyConverter\RSAKey

Inheritance: extends FG\ASN1\Universal\Sequence
显示文件 Open project: spomky-labs/jose Class Usage Examples

Public Methods

Method Description
__construct ( Jose\Object\JWKInterface | string | array $data )
__toString ( )
getCoefficient ( ) : BigInteger | null
getExponent ( ) : BigInteger
getExponents ( ) : BigInteger[]
getModulus ( ) : BigInteger
getModulusLength ( ) : integer
getPrimes ( ) : BigInteger[]
getPrivateExponent ( ) : BigInteger
getPublicExponent ( ) : BigInteger
isPrivate ( ) : boolean
isPublic ( ) : boolean
toArray ( ) : array
toDER ( ) : string
toPEM ( ) : string
toPublic ( RSAKey $private ) : RSAKey

Private Methods

Method Description
convertBase64StringToBigInteger ( string $value ) : BigInteger
fromBase64ToInteger ( string $value ) : string
initPrivateKey ( )
initPublicKey ( )
loadJWK ( array $jwk )
loadPEM ( string $data ) : array
populateBigIntegers ( )
populateCRT ( ) This method adds Chinese Remainder Theorem (CRT) parameters if primes 'p' and 'q' are available.

Method Details

__construct() public method

public __construct ( Jose\Object\JWKInterface | string | array $data )
$data Jose\Object\JWKInterface | string | array

__toString() public method

public __toString ( )

getCoefficient() public method

public getCoefficient ( ) : BigInteger | null
return Jose\Util\BigInteger | null

getExponent() public method

public getExponent ( ) : BigInteger
return Jose\Util\BigInteger

getExponents() public method

public getExponents ( ) : BigInteger[]
return Jose\Util\BigInteger[]

getModulus() public method

public getModulus ( ) : BigInteger
return Jose\Util\BigInteger

getModulusLength() public method

public getModulusLength ( ) : integer
return integer

getPrimes() public method

public getPrimes ( ) : BigInteger[]
return Jose\Util\BigInteger[]

getPrivateExponent() public method

public getPrivateExponent ( ) : BigInteger
return Jose\Util\BigInteger

getPublicExponent() public method

public getPublicExponent ( ) : BigInteger
return Jose\Util\BigInteger

isPrivate() public method

public isPrivate ( ) : boolean
return boolean

isPublic() public method

public isPublic ( ) : boolean
return boolean

toArray() public method

public toArray ( ) : array
return array

toDER() public method

public toDER ( ) : string
return string

toPEM() public method

public toPEM ( ) : string
return string

toPublic() public static method

public static toPublic ( RSAKey $private ) : RSAKey
$private RSAKey
return RSAKey