Debian Codegraph @

lib/3rdParty/composer/web-token/jwt-library/Encryption/Algorithm/KeyEncryption/KeyAgreementWithKeyWrapping.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 KeyAgreementWithKeyWrapping extends KeyEncryptionAlgorithm
11 {
12 /**
13 * Compute and wrap the agreement key.
14 *
15 * @param JWK $recipientKey The receiver's key
16 * @param string $cek The CEK to wrap
17 * @param int $encryption_key_length Size of the key expected for the algorithm used for data encryption
18 * @param array<string, mixed> $complete_header The complete header of the JWT
19 * @param array<string, mixed> $additional_header_values Set additional header values if needed
20 */
21 public function wrapAgreementKey(
22 JWK $recipientKey,
23 ?JWK $senderKey,
24 string $cek,
25 int $encryption_key_length,
26 array $complete_header,
27 array &$additional_header_values
28 ): string;
29
30 /**
31 * Unwrap and compute the agreement key.
32 *
33 * @param JWK $recipientKey The receiver's key
34 * @param string $encrypted_cek The encrypted CEK
35 * @param int $encryption_key_length Size of the key expected for the algorithm used for data encryption
36 * @param array<string, mixed> $complete_header The complete header of the JWT
37 *
38 * @return string The decrypted CEK
39 */
40 public function unwrapAgreementKey(
41 JWK $recipientKey,
42 ?JWK $senderKey,
43 string $encrypted_cek,
44 int $encryption_key_length,
45 array $complete_header
46 ): string;
47 }