lib/3rdParty/composer/web-token/jwt-library/Encryption/Algorithm/KeyEncryption/KeyWrapping.php
raw symbols SCIP| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Jose\Component\Encryption\Algorithm\KeyEncryption; |
| 6 | |
| 7 | use Jose\Component\Core\JWK; |
| 8 | use Jose\Component\Encryption\Algorithm\KeyEncryptionAlgorithm; |
| 9 | |
| 10 | interface KeyWrapping extends KeyEncryptionAlgorithm |
| 11 | { |
| 12 | /** |
| 13 | * Encrypt the CEK. |
| 14 | * |
| 15 | * @param JWK $key The key used to wrap the CEK |
| 16 | * @param string $cek The CEK to encrypt |
| 17 | * @param array<string, mixed> $completeHeader The complete header of the JWT |
| 18 | * @param array<string, mixed> $additionalHeader The complete header of the JWT |
| 19 | */ |
| 20 | public function wrapKey(JWK $key, string $cek, array $completeHeader, array &$additionalHeader): string; |
| 21 | |
| 22 | /** |
| 23 | * Decrypt de CEK. |
| 24 | * |
| 25 | * @param JWK $key The key used to wrap the CEK |
| 26 | * @param string $encrypted_cek The CEK to decrypt |
| 27 | * @param array<string, mixed> $completeHeader The complete header of the JWT |
| 28 | */ |
| 29 | public function unwrapKey(JWK $key, string $encrypted_cek, array $completeHeader): string; |
| 30 | } |