1 | <?php |
||
17 | class RsaAlgorithm implements JweAlgorithm |
||
18 | { |
||
19 | /** @var int */ |
||
20 | private $padding; |
||
21 | |||
22 | /** @var RandomGenerator */ |
||
23 | private $randomGenerator; |
||
24 | |||
25 | /** |
||
26 | * @param int $padding |
||
27 | * @param RandomGenerator $randomGenerator |
||
28 | */ |
||
29 | public function __construct($padding, RandomGenerator $randomGenerator) |
||
34 | |||
35 | /** |
||
36 | * @param int $cekSizeBits |
||
37 | * @param string|resource $kek |
||
38 | * @param array $header |
||
39 | * |
||
40 | * @return array [cek, encryptedCek] |
||
41 | */ |
||
42 | public function wrapNewKey($cekSizeBits, $kek, array $header) |
||
51 | |||
52 | /** |
||
53 | * @param string $encryptedCek |
||
54 | * @param string|resource $key |
||
55 | * @param int $cekSizeBits |
||
56 | * @param array $header |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function unwrap($encryptedCek, $key, $cekSizeBits, array $header) |
||
68 | } |
||
69 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.