public class RsaSigner extends RsaProvider implements Signer
| Modifier and Type | Field and Description |
|---|---|
protected SignatureAlgorithm |
alg |
static java.security.SecureRandom |
DEFAULT_SECURE_RANDOM
JJWT's default SecureRandom number generator.
|
protected java.security.Key |
key |
| Constructor and Description |
|---|
RsaSigner(SignatureAlgorithm alg,
java.security.Key key) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
doSign(byte[] data) |
protected java.security.Signature |
getSignatureInstance() |
protected boolean |
isBouncyCastleAvailable() |
byte[] |
sign(byte[] data) |
createSignatureInstance, doSetParameter, generateKeyPair, generateKeyPair, generateKeyPair, generateKeyPair, generateKeyPair, setParameterpublic static final java.security.SecureRandom DEFAULT_SECURE_RANDOM
static {
DEFAULT_SECURE_RANDOM = new SecureRandom();
DEFAULT_SECURE_RANDOM.nextBytes(new byte[64]);
}
nextBytes is called to force the RNG to initialize itself if not already initialized. The
byte array is not used and discarded immediately for garbage collection.
protected final SignatureAlgorithm alg
protected final java.security.Key key
public RsaSigner(SignatureAlgorithm alg, java.security.Key key)
protected byte[] doSign(byte[] data)
throws java.security.InvalidKeyException,
java.security.SignatureException
java.security.InvalidKeyExceptionjava.security.SignatureExceptionprotected java.security.Signature getSignatureInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionprotected boolean isBouncyCastleAvailable()
Copyright © 2014-2022 jsonwebtoken.io. All Rights Reserved.