private function setKeyEncryptionAlgorithms($key_encryption_algorithms)
{
$result = [];
foreach ($key_encryption_algorithms as $key_encryption_algorithm) {
if (is_string($key_encryption_algorithm)) {
$result[] = $key_encryption_algorithm;
} elseif ($key_encryption_algorithm instanceof KeyEncryptionAlgorithmInterface) {
$result[] = $key_encryption_algorithm->getAlgorithmName();
} else {
throw new \InvalidArgumentException('Parameter must be a string or an instance of KeyEncryptionAlgorithmInterface');
}
}
$this->key_encryption_algorithms = $result;
}