ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
SAML2\Certificate\PrivateKey Class Reference
+ Inheritance diagram for SAML2\Certificate\PrivateKey:
+ Collaboration diagram for SAML2\Certificate\PrivateKey:

Public Member Functions

 getKeyAsString ()
 
 getPassphrase ()
 
- Public Member Functions inherited from SAML2\Certificate\Key
 __construct (array $keyData)
 
 canBeUsedFor ($usage)
 Whether or not the key is configured to be used for usage given. More...
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 

Static Public Member Functions

static create ($keyContents, $passphrase=null)
 
- Static Public Member Functions inherited from SAML2\Certificate\Key
static getValidKeyUsages ()
 Returns the list of valid key usage options. More...
 

Additional Inherited Members

- Data Fields inherited from SAML2\Certificate\Key
const USAGE_SIGNING = 'signing'
 
const USAGE_ENCRYPTION = 'encryption'
 
- Protected Member Functions inherited from SAML2\Certificate\Key
 assertIsString ($test)
 Asserts that the parameter is of type string. More...
 
- Protected Attributes inherited from SAML2\Certificate\Key
 $keyData = array()
 

Detailed Description

Definition at line 7 of file PrivateKey.php.

Member Function Documentation

◆ create()

static SAML2\Certificate\PrivateKey::create (   $keyContents,
  $passphrase = null 
)
static

Definition at line 9 of file PrivateKey.php.

References SAML2\Certificate\Key\$keyData, array, and SAML2\Exception\InvalidArgumentException\invalidType().

Referenced by SAML2\Certificate\PrivateKeyLoader\loadPrivateKey().

10  {
11  if (!is_string($keyContents)) {
12  throw InvalidArgumentException::invalidType('string', $keyContents);
13  }
14 
15  if ($passphrase && !is_string($passphrase)) {
16  throw InvalidArgumentException::invalidType('string', $passphrase);
17  }
18 
19  $keyData = array('PEM' => $keyContents, self::USAGE_ENCRYPTION => true);
20  if ($passphrase) {
21  $keyData['passphrase'] = $passphrase;
22  }
23 
24  return new self($keyData);
25  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getKeyAsString()

SAML2\Certificate\PrivateKey::getKeyAsString ( )

Definition at line 27 of file PrivateKey.php.

Referenced by SAML2\Certificate\PrivateKeyLoader\convertPrivateKeyToRsaKey().

28  {
29  return $this->keyData['PEM'];
30  }
+ Here is the caller graph for this function:

◆ getPassphrase()

SAML2\Certificate\PrivateKey::getPassphrase ( )

Definition at line 32 of file PrivateKey.php.

Referenced by SAML2\Certificate\PrivateKeyLoader\convertPrivateKeyToRsaKey().

33  {
34  return isset($this->keyData['passphrase']) ? $this->keyData['passphrase'] : null;
35  }
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: