Modifier and Type | Method and Description |
---|---|
boolean |
canVerify(Algorithm algorithm) |
static RSAVerifier |
newVerifier(byte[] bytes)
Return a new instance of the RSA Verifier with the provided public key.
|
static RSAVerifier |
newVerifier(Path path)
Return a new instance of the RSA Verifier with the provided public key.
|
static RSAVerifier |
newVerifier(Path path,
CryptoProvider cryptoProvider)
Return a new instance of the RSA Verifier with the provided public key.
|
static RSAVerifier |
newVerifier(RSAPublicKey publicKey)
Return a new instance of the RSA Verifier with the provided public key.
|
static RSAVerifier |
newVerifier(RSAPublicKey publicKey,
CryptoProvider cryptoProvider)
Return a new instance of the RSA Verifier with the provided public key.
|
static RSAVerifier |
newVerifier(String publicKey)
Return a new instance of the RSA Verifier with the provided public key.
|
static RSAVerifier |
newVerifier(String publicKey,
CryptoProvider cryptoProvider)
Return a new instance of the RSA Verifier with the provided public key.
|
void |
verify(Algorithm algorithm,
byte[] message,
byte[] signature)
Verify the signature of the encoded JWT payload.
|
public static RSAVerifier newVerifier(RSAPublicKey publicKey)
publicKey
- The RSA public key object.public static RSAVerifier newVerifier(RSAPublicKey publicKey, CryptoProvider cryptoProvider)
publicKey
- The RSA public key object.cryptoProvider
- The crypto provider used to get the RSA signature Algorithm.public static RSAVerifier newVerifier(String publicKey)
publicKey
- The RSA public key PEM.public static RSAVerifier newVerifier(String publicKey, CryptoProvider cryptoProvider)
publicKey
- The RSA public key PEM.cryptoProvider
- The crypto provider used to get the RSA signature Algorithm.public static RSAVerifier newVerifier(Path path)
path
- The path to the RSA public key PEM.public static RSAVerifier newVerifier(Path path, CryptoProvider cryptoProvider)
path
- The path to the RSA public key PEM.cryptoProvider
- The crypto provider used to get the RSA signature Algorithm.public static RSAVerifier newVerifier(byte[] bytes)
bytes
- The bytes of the RSA public key PEM.public boolean canVerify(Algorithm algorithm)
Copyright © 2021. All rights reserved.