9 public static function create($keyContents, $passphrase = null)
11 if (!is_string($keyContents)) {
15 if ($passphrase && !is_string($passphrase)) {
19 $keyData = array(
'PEM' => $keyContents, self::USAGE_ENCRYPTION =>
true);
21 $keyData[
'passphrase'] = $passphrase;
29 return $this->keyData[
'PEM'];
34 return isset($this->keyData[
'passphrase']) ? $this->keyData[
'passphrase'] : null;
static invalidType($expected, $parameter)
Simple DTO wrapper for (X509) keys.
static create($keyContents, $passphrase=null)