JWT Framework
Search…
Signature Algorithms
This framework comes with several signature algorithms. These algorithms are in the following namespace: Jose\Component\Signature\Algorithm.
Algorithm
Description
Package
HS256
HS384
HS512
HMAC with SHA-2 Functions
web-token/jwt-signature-algorithm-hmac
ES256
ES384
ES512
Elliptic Curve Digital Signature Algorithm (ECDSA)
web-token/jwt-signature-algorithm-ecdsa
RS256
RS384
RS512
RSASSA-PKCS1 v1_5
web-token/jwt-signature-algorithm-rsa
PS256
PS384
PS512
RSASSA-PSS
web-token/jwt-signature-algorithm-rsa
EdDSA (only with the Ed25519 curve)
Edwards-curve Digital Signature Algorithm (EdDSA)
web-token/jwt-signature-algorithm-eddsa
none
web-token/jwt-signature-algorithm-none
The following signature algorithms are experimental and must not be used in production unless you know what you are doing. They are proposed for testing purpose only.
They are provided throught the package web-token/jwt-signature-algorithm-experimental.
Algorithm
Description
RS1
RSASSA-PKCS1 v1_5 with SHA-1 hashing function
HS1
HMAC with SHA-1 hashing function
ES256K
Elliptic curve secp256k1 support

How To Use

These algorithms have to be used with the Algorithm Manager. They do not need any arguments.
Example:
1
<?php
2
3
use Jose\Component\Core\AlgorithmManager;
4
use Jose\Component\Signature\Algorithm\PS256;
5
use Jose\Component\Signature\Algorithm\ES512;
6
use Jose\Component\Signature\Algorithm\None;
7
8
$algorithm_manager = new AlgorithmManager([
9
new PS256(),
10
new ES512(),
11
new None(),
12
]);
Copied!
Export as PDF
Copy link
Contents
How To Use