private function fromCompactSerializationRecipientToSerialization(array $parts)
{
$recipient = [];
if (!empty($parts[1])) {
$recipient['encrypted_key'] = $parts[1];
}
$recipients = ['recipients' => [$recipient]];
foreach ([0 => 'protected', 2 => 'iv', 3 => 'ciphertext', 4 => 'tag'] as $part => $key) {
if (!empty($parts[$part])) {
$recipients[$key] = $parts[$part];
}
}
return $recipients;
}