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
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 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)
-
-
-
Method Detail
-
sign
public abstract byte[] sign(String data) throws JWTSignException
- Throws:
JWTSignException
-
sign
public abstract byte[] sign(byte[] data) throws JWTSignException- Throws:
JWTSignException
-
verify
public abstract boolean verify(byte[] data, byte[] expected) throws JWTValidationException- Throws:
JWTValidationException
-
getName
public String getName()
-
getDescription
public String getDescription()
-
-