@@ -38,9 +38,10 @@ class JWT
38
38
public static $ timestamp = null ;
39
39
40
40
public static $ supported_algs = array (
41
+ 'ES256 ' => array ('openssl ' , 'SHA256 ' ),
41
42
'HS256 ' => array ('hash_hmac ' , 'SHA256 ' ),
42
- 'HS512 ' => array ('hash_hmac ' , 'SHA512 ' ),
43
43
'HS384 ' => array ('hash_hmac ' , 'SHA384 ' ),
44
+ 'HS512 ' => array ('hash_hmac ' , 'SHA512 ' ),
44
45
'RS256 ' => array ('openssl ' , 'SHA256 ' ),
45
46
'RS384 ' => array ('openssl ' , 'SHA384 ' ),
46
47
'RS512 ' => array ('openssl ' , 'SHA512 ' ),
@@ -53,7 +54,7 @@ class JWT
53
54
* @param string|array $key The key, or map of keys.
54
55
* If the algorithm used is asymmetric, this is the public key
55
56
* @param array $allowed_algs List of supported verification algorithms
56
- * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256 '
57
+ * Supported algorithms are 'ES256', ' HS256', 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512 '
57
58
*
58
59
* @return object The JWT's payload as a PHP object
59
60
*
@@ -144,7 +145,7 @@ public static function decode($jwt, $key, array $allowed_algs = array())
144
145
* @param string $key The secret key.
145
146
* If the algorithm used is asymmetric, this is the private key
146
147
* @param string $alg The signing algorithm.
147
- * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256 '
148
+ * Supported algorithms are 'ES256', ' HS256', 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512 '
148
149
* @param mixed $keyId
149
150
* @param array $head An array with header elements to attach
150
151
*
@@ -179,7 +180,7 @@ public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $he
179
180
* @param string $msg The message to sign
180
181
* @param string|resource $key The secret key
181
182
* @param string $alg The signing algorithm.
182
- * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256 '
183
+ * Supported algorithms are 'ES256', ' HS256', 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512 '
183
184
*
184
185
* @return string An encrypted message
185
186
*
0 commit comments