@@ -38,9 +38,10 @@ class JWT
3838 public static $ timestamp = null ;
3939
4040 public static $ supported_algs = array (
41+ 'ES256 ' => array ('openssl ' , 'SHA256 ' ),
4142 'HS256 ' => array ('hash_hmac ' , 'SHA256 ' ),
42- 'HS512 ' => array ('hash_hmac ' , 'SHA512 ' ),
4343 'HS384 ' => array ('hash_hmac ' , 'SHA384 ' ),
44+ 'HS512 ' => array ('hash_hmac ' , 'SHA512 ' ),
4445 'RS256 ' => array ('openssl ' , 'SHA256 ' ),
4546 'RS384 ' => array ('openssl ' , 'SHA384 ' ),
4647 'RS512 ' => array ('openssl ' , 'SHA512 ' ),
@@ -53,7 +54,7 @@ class JWT
5354 * @param string|array $key The key, or map of keys.
5455 * If the algorithm used is asymmetric, this is the public key
5556 * @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 '
5758 *
5859 * @return object The JWT's payload as a PHP object
5960 *
@@ -144,7 +145,7 @@ public static function decode($jwt, $key, array $allowed_algs = array())
144145 * @param string $key The secret key.
145146 * If the algorithm used is asymmetric, this is the private key
146147 * @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 '
148149 * @param mixed $keyId
149150 * @param array $head An array with header elements to attach
150151 *
@@ -179,7 +180,7 @@ public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $he
179180 * @param string $msg The message to sign
180181 * @param string|resource $key The secret key
181182 * @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 '
183184 *
184185 * @return string An encrypted message
185186 *
0 commit comments