12 class Key implements \ArrayAccess
29 foreach ($keyData as $property => $value) {
42 if (!in_array($usage, static::getValidKeyUsages())) {
46 return isset($this->keyData[$usage]) && $this->keyData[$usage];
56 self::USAGE_ENCRYPTION,
63 return array_key_exists($offset, $this->keyData);
70 return $this->keyData[$offset];
77 $this->keyData[$offset] = $value;
84 unset($this->keyData[$offset]);
95 if (!is_string(
$test)) {
static invalidType($expected, $parameter)
Named exception for when a non-existent key-usage is given.
assertIsString($test)
Asserts that the parameter is of type string.
Simple DTO wrapper for (X509) keys.
canBeUsedFor($usage)
Whether or not the key is configured to be used for usage given.
static getValidKeyUsages()
Returns the list of valid key usage options.
Create styles array
The data for the language used.
__construct(array $keyData)
offsetSet($offset, $value)