File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 18
18
19
19
abstract class PBES2AESKW implements KeyWrapping
20
20
{
21
- /**
22
- * @var int
23
- */
24
21
private $ salt_size ;
25
22
26
- /**
27
- * @var int
28
- */
29
23
private $ nb_count ;
30
24
31
25
public function __construct (int $ salt_size = 64 , int $ nb_count = 4096 )
@@ -80,7 +74,7 @@ public function getKeyManagementMode(): string
80
74
return self ::MODE_WRAP ;
81
75
}
82
76
83
- protected function checkKey (JWK $ key )
77
+ protected function checkKey (JWK $ key ): void
84
78
{
85
79
if (!\in_array ($ key ->get ('kty ' ), $ this ->allowedKeyTypes (), true )) {
86
80
throw new \InvalidArgumentException ('Wrong key type. ' );
@@ -90,7 +84,7 @@ protected function checkKey(JWK $key)
90
84
}
91
85
}
92
86
93
- protected function checkHeaderAlgorithm (array $ header )
87
+ protected function checkHeaderAlgorithm (array $ header ): void
94
88
{
95
89
if (!\array_key_exists ('alg ' , $ header )) {
96
90
throw new \InvalidArgumentException ('The header parameter "alg" is missing. ' );
@@ -100,7 +94,7 @@ protected function checkHeaderAlgorithm(array $header)
100
94
}
101
95
}
102
96
103
- protected function checkHeaderAdditionalParameters (array $ header )
97
+ protected function checkHeaderAdditionalParameters (array $ header ): void
104
98
{
105
99
foreach (['p2s ' , 'p2c ' ] as $ k ) {
106
100
if (!\array_key_exists ($ k , $ header )) {
You can’t perform that action at this time.
0 commit comments