java.lang.Object | ||
↳ | java.security.SignatureSpi | |
↳ | sun.security.ssl.RSASignature |
Signature implementation for the SSL/TLS RSA Signature variant with both MD5 and SHA-1 MessageDigests. Used for explicit RSA server authentication (RSA signed server key exchange for RSA_EXPORT and DHE_RSA) and RSA client authentication (RSA signed certificate verify message). It conforms to the standard JCA Signature API. It is registered in the SunJSSE provider to avoid more complicated getInstance() code and negative interaction with the JCA mechanisms for hardware providers. The class should be instantiated via the getInstance() method in this class, which returns the implementation from the prefered provider. The internal implementation allows the hashes to be explicitly set, which is required for RSA client authentication. It can be obtained via the getInternalInstance() method. This class is not thread safe.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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.
| |||||||||||
Verifies the passed-in signature in the specified array
of bytes, starting at the specified offset.
| |||||||||||
Verifies the passed-in signature.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
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 |
Updates the data to be signed or verified using the specified byte.
b | the byte to use for the update. |
---|
Verifies the passed-in signature in the specified array of bytes, starting at the specified offset.
Note: Subclasses should overwrite the default implementation.
sigBytes | the signature bytes to be verified. |
---|---|
offset | the offset to start from in the array of bytes. |
length | the number of bytes to use, starting at offset. |
SignatureException |
---|
Verifies the passed-in signature.
sigBytes | the signature bytes to be verified. |
---|
SignatureException |
---|