RSA instance options

package Default
inherited_from \Zend\Stdlib\AbstractOptions

 Methods

Constructor

__construct(array|\Traversable|null $options = null
Inherited

Parameters

$options

array\Traversablenull

Get a configuration property

__get(string $key) : mixed
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__get()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Returns

mixed

Test if a configuration property is null

__isset(string $key) : boolean
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__isset()

Parameters

$key

string

Returns

boolean

Set a configuration property

__set(string $key, mixed $value) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__set()

Parameters

$key

string

$value

mixed

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Set a configuration property to NULL

__unset(string $key) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__unset()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Generate new private/public key pair

generateKeys(array $opensslConfig = array()) : \Zend\Crypt\PublicKey\RsaOptions

Parameters

$opensslConfig

array

Exceptions

\Zend\Crypt\PublicKey\Rsa\Exception\RuntimeException

Returns

\Zend\Crypt\PublicKey\RsaOptions

Get the value of binary output

getBinaryOutput() : boolean

Returns

boolean

Get hash algorithm

getHashAlgorithm() : string

Returns

string

getOpensslSignatureAlgorithm()

getOpensslSignatureAlgorithm() 

Get pass phrase

getPassPhrase() : string

Returns

string

Get private key

getPrivateKey() : null | \Zend\Crypt\PublicKey\Rsa\PrivateKey

Returns

null\Zend\Crypt\PublicKey\Rsa\PrivateKey

Get public key

getPublicKey() : null | \Zend\Crypt\PublicKey\Rsa\PublicKey

Returns

null\Zend\Crypt\PublicKey\Rsa\PublicKey

Enable/disable the binary output

setBinaryOutput(boolean $value) : \Zend\Crypt\PublicKey\RsaOptions

Parameters

$value

boolean

Returns

\Zend\Crypt\PublicKey\RsaOptions

Set one or more configuration properties

setFromArray(array|\Traversable|\Zend\Stdlib\AbstractOptions $options) : \Zend\Stdlib\AbstractOptions
Inherited

Parameters

$options

array\Traversable\Zend\Stdlib\AbstractOptions

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Returns

\Zend\Stdlib\AbstractOptionsProvides fluent interface

Set hash algorithm

setHashAlgorithm(string $hash) : \Zend\Crypt\PublicKey\RsaOptions

Parameters

$hash

string

Exceptions

\Zend\Crypt\PublicKey\Rsa\Exception\RuntimeException
\Zend\Crypt\PublicKey\Rsa\Exception\InvalidArgumentException

Returns

\Zend\Crypt\PublicKey\RsaOptions

Set pass phrase

setPassPhrase(string $phrase) : \Zend\Crypt\PublicKey\RsaOptions

Parameters

$phrase

string

Returns

\Zend\Crypt\PublicKey\RsaOptions

Set private key

setPrivateKey(\Zend\Crypt\PublicKey\Rsa\PrivateKey $key) : \Zend\Crypt\PublicKey\RsaOptions

Parameters

$key

\Zend\Crypt\PublicKey\Rsa\PrivateKey

Returns

\Zend\Crypt\PublicKey\RsaOptions

Set public key

setPublicKey(\Zend\Crypt\PublicKey\Rsa\PublicKey $key) : \Zend\Crypt\PublicKey\RsaOptions

Parameters

$key

\Zend\Crypt\PublicKey\Rsa\PublicKey

Returns

\Zend\Crypt\PublicKey\RsaOptions

Cast to array

toArray() : array
Inherited

Returns

array

 Properties

 

We use the __ prefix to avoid collisions with properties in user-implementations.

$__strictMode__ : boolean

Default

true
 

Output is binary

$binaryOutput : boolean

Default

true
 

$hashAlgorithm

$hashAlgorithm : string

Default

'sha1'
 

Signature hash algorithm defined by openss constants

$opensslSignatureAlgorithm : integer

Default

null
 

$passPhrase

$passPhrase : string

Default

null
 

$privateKey

$privateKey : \Zend\Crypt\PublicKey\Rsa\PrivateKey

Default

null
 

$publicKey

$publicKey : \Zend\Crypt\PublicKey\Rsa\PublicKey

Default

null