Jose\Encrypter::createEncrypter PHP Method

createEncrypter() public static method

public static createEncrypter ( array $key_encryption_algorithms, array $content_encryption_algorithms, array $compression_methods = ['DEF', 'ZLIB', 'GZ'] )
$key_encryption_algorithms array
$content_encryption_algorithms array
$compression_methods array
    public static function createEncrypter(array $key_encryption_algorithms, array $content_encryption_algorithms, array $compression_methods = ['DEF', 'ZLIB', 'GZ'])
    {
        $encrypter = new self($key_encryption_algorithms, $content_encryption_algorithms, $compression_methods);
        return $encrypter;
    }

Usage Example

 /**
  * @param string[] $selected_key_encryption_algorithms
  * @param string[] $selected_content_encryption_algorithms
  * @param string[] $selected_compression_methods
  *
  * @return \Jose\EncrypterInterface
  */
 public function createEncrypter(array $selected_key_encryption_algorithms, array $selected_content_encryption_algorithms, array $selected_compression_methods)
 {
     $key_encryption_algorithms = $this->algorithm_manager->getSelectedAlgorithmMethods($selected_key_encryption_algorithms);
     $content_encryption_algorithms = $this->algorithm_manager->getSelectedAlgorithmMethods($selected_content_encryption_algorithms);
     $compression_methods = $this->compression_manager->getSelectedCompressionMethods($selected_compression_methods);
     return Encrypter::createEncrypter($key_encryption_algorithms, $content_encryption_algorithms, $compression_methods);
 }
All Usage Examples Of Jose\Encrypter::createEncrypter