| Server IP : 172.67.191.97 / Your IP : 104.23.243.196 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/congresofce/libraries/vendor/web-token/jwt-library/Encryption/ |
Upload File : |
<?php
declare(strict_types=1);
namespace Jose\Component\Encryption;
use Jose\Component\Core\AlgorithmManagerFactory;
use Jose\Component\Encryption\Compression\CompressionMethodManagerFactory;
class JWEDecrypterFactory
{
public function __construct(
private readonly AlgorithmManagerFactory $algorithmManagerFactory,
private readonly null|CompressionMethodManagerFactory $compressionMethodManagerFactory = null
) {
if ($compressionMethodManagerFactory !== null) {
trigger_deprecation(
'web-token/jwt-library',
'3.3.0',
'The parameter "$compressionMethodManagerFactory" is deprecated and will be removed in 4.0.0. Compression is not recommended for JWE. Please set "null" instead.'
);
}
}
/**
* Creates a JWE Decrypter object using the given key encryption algorithms, content encryption algorithms and
* compression methods.
*
* @param string[] $encryptionAlgorithms
* @param null|string[] $contentEncryptionAlgorithms
* @param null|string[] $compressionMethods
*/
public function create(
array $encryptionAlgorithms,
null|array $contentEncryptionAlgorithms = null,
null|array $compressionMethods = null
): JWEDecrypter {
if ($contentEncryptionAlgorithms !== null) {
$encryptionAlgorithms = array_merge($encryptionAlgorithms, $contentEncryptionAlgorithms);
}
$algorithmManager = $this->algorithmManagerFactory->create($encryptionAlgorithms);
$compressionMethodManager = $compressionMethods === null ? null : $this->compressionMethodManagerFactory?->create(
$compressionMethods
);
return new JWEDecrypter($algorithmManager, null, $compressionMethodManager);
}
}