java.lang.Object | ||
↳ | java.security.SignatureSpi | |
↳ | sun.security.rsa.RSASignature |
![]() |
PKCS#1 RSA signatures with the various message digest algorithms. This file contains an abstract base class with all the logic plus a nested static class for each of the message digest algorithms (see end of the file). We support MD2, MD5, SHA-1, SHA-256, SHA-384, and SHA-512.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
RSASignature.MD2withRSA | |||||||||||
RSASignature.MD5withRSA | |||||||||||
RSASignature.SHA1withRSA | |||||||||||
RSASignature.SHA256withRSA | |||||||||||
RSASignature.SHA384withRSA | |||||||||||
RSASignature.SHA512withRSA |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Decode the signature data.
| |||||||||||
Encode the digest, return the to-be-signed data.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
No replacement.
| |||||||||||
Initializes this signature object with the specified
private key and source of randomness for signing operations.
| |||||||||||
Initializes this signature object with the specified
private key for signing operations.
| |||||||||||
Initializes this signature object with the specified
public key for verification operations.
| |||||||||||
This method is deprecated.
Replaced by
engineSetParameter .
| |||||||||||
Returns the signature bytes of all the data
updated so far.
| |||||||||||
Updates the data to be signed or verified, using the
specified array of bytes, starting at the specified offset.
| |||||||||||
Updates the data to be signed or verified
using the specified byte.
| |||||||||||
Updates the data to be signed or verified using the specified
ByteBuffer.
| |||||||||||
Verifies the passed-in signature.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Decode the signature data. Verify that the object identifier matches and return the message digest.
IOException |
---|
Encode the digest, return the to-be-signed data. Also used by the PKCS#11 provider.
IOException |
---|
This method is deprecated.
No replacement.
Gets the value of the specified algorithm parameter. This method supplies a general-purpose mechanism through which it is possible to get the various parameters of this object. A parameter may be any settable parameter for the algorithm, such as a parameter size, or a source of random bits for signature generation (if appropriate), or an indication of whether or not to perform a specific but optional computation. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.
param | the string name of the parameter. |
---|
InvalidParameterException |
---|
Initializes this signature object with the specified private key and source of randomness for signing operations.
This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.)
privateKey | the private key of the identity whose signature will be generated. |
---|---|
random | the source of randomness |
InvalidKeyException |
---|
Initializes this signature object with the specified private key for signing operations.
privateKey | the private key of the identity whose signature will be generated. |
---|
InvalidKeyException |
---|
Initializes this signature object with the specified public key for verification operations.
publicKey | the public key of the identity whose signature is going to be verified. |
---|
InvalidKeyException |
---|
This method is deprecated.
Replaced by engineSetParameter
.
Sets the specified algorithm parameter to the specified value. This method supplies a general-purpose mechanism through which it is possible to set the various parameters of this object. A parameter may be any settable parameter for the algorithm, such as a parameter size, or a source of random bits for signature generation (if appropriate), or an indication of whether or not to perform a specific but optional computation. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.
param | the string identifier of the parameter. |
---|---|
value | the parameter value. |
InvalidParameterException |
---|
Returns the signature bytes of all the data updated so far. The format of the signature depends on the underlying signature scheme.
SignatureException |
---|
Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
b | the array of bytes |
---|---|
off | the offset to start from in the array of bytes |
len | the number of bytes to use, starting at offset |
SignatureException |
---|
Updates the data to be signed or verified using the specified byte.
b | the byte to use for the update. |
---|
SignatureException |
---|
Updates the data to be signed or verified using the specified
ByteBuffer. Processes the data.remaining()
bytes
starting at at data.position()
.
Upon return, the buffer's position will be equal to its limit;
its limit will not have changed.
b | the ByteBuffer |
---|
Verifies the passed-in signature.
sigBytes | the signature bytes to be verified. |
---|
SignatureException |
---|