PHP Class Jose\Encrypter

Inheritance: implements jose\EncrypterInterface, use trait Jose\Behaviour\HasKeyChecker, use trait Jose\Behaviour\HasJWAManager, use trait Jose\Behaviour\HasPayloadConverter, use trait Jose\Behaviour\HasCompressionManager
Datei anzeigen Open project: spomky-labs/jose Class Usage Examples

Public Methods

Method Description
__construct ( array $key_encryption_algorithms, array $content_encryption_algorithms, array $compression_methods ) Decrypter constructor.
createEncrypter ( array $key_encryption_algorithms, array $content_encryption_algorithms, array $compression_methods = ['DEF', 'ZLIB', 'GZ'] )
encrypt ( Jose\Object\JWEInterface &$jwe )

Private Methods

Method Description
encryptJWE ( Jose\Object\JWEInterface &$jwe, Jose\Algorithm\ContentEncryptionAlgorithmInterface $content_encryption_algorithm, string $cek, string $iv, Jose\Compression\CompressionInterface $compression_method = null )
getEncryptedKey ( array $complete_headers, string $cek, Jose\Algorithm\KeyEncryptionAlgorithmInterface $key_encryption_algorithm, Jose\Algorithm\ContentEncryptionAlgorithmInterface $content_encryption_algorithm, array &$additional_headers, Jose\Object\JWKInterface $recipient_key ) : string | null
getEncryptedKeyFromKeyAgreementAndKeyWrappingAlgorithm ( array $complete_headers, string $cek, Jose\Algorithm\KeyEncryption\KeyAgreementWrappingInterface $key_encryption_algorithm, Jose\Algorithm\ContentEncryptionAlgorithmInterface $content_encryption_algorithm, array &$additional_headers, Jose\Object\JWKInterface $recipient_key ) : string
getEncryptedKeyFromKeyEncryptionAlgorithm ( array $complete_headers, string $cek, Jose\Algorithm\KeyEncryption\KeyEncryptionInterface $key_encryption_algorithm, Jose\Object\JWKInterface $recipient_key, array &$additional_headers ) : string
getEncryptedKeyFromKeyWrappingAlgorithm ( array $complete_headers, string $cek, Jose\Algorithm\KeyEncryption\KeyWrappingInterface $key_encryption_algorithm, Jose\Object\JWKInterface $recipient_key, array &$additional_headers ) : string
preparePayload ( string $payload, Jose\Compression\CompressionInterface $compression_method = null ) : string
processRecipient ( Jose\Object\JWEInterface $jwe, Jose\Object\RecipientInterface &$recipient, string $cek, Jose\Algorithm\ContentEncryptionAlgorithmInterface $content_encryption_algorithm, array &$additional_headers )

Method Details

__construct() public method

Decrypter constructor.
public __construct ( array $key_encryption_algorithms, array $content_encryption_algorithms, array $compression_methods )
$key_encryption_algorithms array
$content_encryption_algorithms array
$compression_methods array

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

encrypt() public method

public encrypt ( Jose\Object\JWEInterface &$jwe )
$jwe Jose\Object\JWEInterface