Class Algorithm
java.lang.Object
com.bastiaanjansen.jwt.Algorithms.Algorithm
- Direct Known Subclasses:
HMACAlgorithm,RSAAlgorithm
public abstract class Algorithm extends Object
-
Field Summary
Fields Modifier and Type Field Description protected Stringdescriptionprotected Stringname -
Method Summary
Modifier and Type Method Description StringgetDescription()StringgetName()static AlgorithmHMAC256(String secret)static AlgorithmHMAC384(String secret)static AlgorithmHMAC512(String secret)static AlgorithmRSA256(KeyPair keyPair)static AlgorithmRSA384(KeyPair keyPair)static AlgorithmRSA512(KeyPair keyPair)abstract byte[]sign(byte[] data)abstract byte[]sign(String data)abstract booleanverify(byte[] data, byte[] expected)
-
Field Details
-
Method Details
-
HMAC256
-
HMAC384
-
HMAC512
-
RSA256
-
RSA384
-
RSA512
-
sign
- Throws:
JWTSignException
-
sign
- Throws:
JWTSignException
-
verify
- Throws:
JWTValidationException
-
getName
-
getDescription
-