Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
RsaOptions Class Reference

RSA instance options. More...

Public Member Functions

 setPrivateKey (Rsa\PrivateKey $key)
 Set private key.
 
 getPrivateKey ()
 Get private key.
 
 setPublicKey (Rsa\PublicKey $key)
 Set public key.
 
 getPublicKey ()
 Get public key.
 
 setPassPhrase ($phrase)
 Set pass phrase.
 
 getPassPhrase ()
 Get pass phrase.
 
 setHashAlgorithm ($hash)
 Set hash algorithm.
 
 getHashAlgorithm ()
 Get hash algorithm.
 
 getOpensslSignatureAlgorithm ()
 
 setBinaryOutput ($value)
 Enable/disable the binary output.
 
 getBinaryOutput ()
 Get the value of binary output.
 
 getOpensslPadding ()
 Get the OPENSSL padding.
 
 setOpensslPadding ($opensslPadding)
 Set the OPENSSL padding.
 
 generateKeys (array $opensslConfig=[])
 Generate new private/public key pair.
 
- Public Member Functions inherited from AbstractOptions
 __construct ($options=null)
 Constructor.
 
 setFromArray ($options)
 Set one or more configuration properties.
 
 toArray ()
 Cast to array.
 
 __set ($key, $value)
 Set a configuration property.
 
 __get ($key)
 Get a configuration property.
 
 __isset ($key)
 Test if a configuration property is null.
 
 __unset ($key)
 Set a configuration property to NULL.
 

Protected Attributes

 $privateKey = null
 
 $publicKey = null
 
 $hashAlgorithm = 'sha1'
 
 $opensslSignatureAlgorithm = null
 
 $passPhrase = null
 
 $binaryOutput = true
 
 $opensslPadding
 
- Protected Attributes inherited from AbstractOptions
 $__strictMode__ = true
 

Detailed Description

RSA instance options.

Member Function Documentation

generateKeys ( array  $opensslConfig = [])

Generate new private/public key pair.

Parameters
array$opensslConfig
Returns
RsaOptions
Exceptions
Rsa\Exception\RuntimeException
getBinaryOutput ( )

Get the value of binary output.

Returns
bool
getHashAlgorithm ( )

Get hash algorithm.

Returns
string
getOpensslPadding ( )

Get the OPENSSL padding.

Returns
int|null
getOpensslSignatureAlgorithm ( )
getPassPhrase ( )

Get pass phrase.

Returns
string
getPrivateKey ( )

Get private key.

Returns
null|Rsa
getPublicKey ( )

Get public key.

Returns
null|Rsa
setBinaryOutput (   $value)

Enable/disable the binary output.

Parameters
bool$value
Returns
RsaOptions
setHashAlgorithm (   $hash)

Set hash algorithm.

Parameters
string$hash
Returns
RsaOptions
Exceptions
Rsa\Exception\RuntimeException
Rsa\Exception\InvalidArgumentException
setOpensslPadding (   $opensslPadding)

Set the OPENSSL padding.

Parameters
int | null$opensslPadding
Returns
$this
setPassPhrase (   $phrase)

Set pass phrase.

Parameters
string$phrase
Returns
RsaOptions
setPrivateKey ( Rsa\PrivateKey  $key)

Set private key.

Parameters
Rsa\PrivateKey$key
Returns
RsaOptions
setPublicKey ( Rsa\PublicKey  $key)

Set public key.

Parameters
Rsa\PublicKey$key
Returns
RsaOptions

Member Data Documentation

$binaryOutput = true
protected
$hashAlgorithm = 'sha1'
protected
$opensslPadding
protected
$opensslSignatureAlgorithm = null
protected
$passPhrase = null
protected
$privateKey = null
protected
$publicKey = null
protected