| java.lang.Object | |
| ↳ | java.security.SignatureSpi | 
|  Known Direct Subclasses | 
SignatureSpi is the Service Provider Interface (SPI) definition for Signature.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | appRandom | Implementation specific source of randomness. | |||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  |  | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Creates and returns a copy of this 
            Object. | ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  |  
           This method was deprecated in API level 1. There is no generally accepted parameter naming convention. 
           | ||||||||||
|  | 
           Returns the 
            AlgorithmParametersof thisSignatureSpiinstance. | ||||||||||
|  | 
           Initializes this 
            SignatureSpiinstance for signing, using the private key of the identity whose signature is going to be generated and the specified source of randomness. | ||||||||||
|  | 
           Initializes this 
            SignatureSpiinstance for signing, using the private key of the identity whose signature is going to be generated. | ||||||||||
|  | 
           Initializes this 
            SignatureSpiinstance for signature verification, using the public key of the identity whose signature is going to be verified. | ||||||||||
|  |  
           This method was deprecated in API level 1. Use  engineSetParameter(AlgorithmParameterSpec) | ||||||||||
|  | 
           Sets the specified 
            AlgorithmParameterSpec. | ||||||||||
|  | 
           Generates and stores the signature of all updated data in the provided 
            byte[]at the specified position with the specified length. | ||||||||||
|  | 
           Generates and returns the signature of all updated data.
           | ||||||||||
|  | 
           Updates the data to be verified or to be signed, using the specified 
            byte. | ||||||||||
|  | 
           Updates the data to be verified or to be signed, using the specified 
            ByteBuffer. | ||||||||||
|  | 
           Updates the data to be verified or to be signed, using the given 
            byte[], starting form the specified index for the specified length. | ||||||||||
|  | 
           Indicates whether the given 
            sigBytesstarting at indexoffsetwithlengthbytes can be verified using the public key or a certificate of the signer. | ||||||||||
|  | 
           Indicates whether the given 
            sigBytescan be verified using the public key or a certificate of the signer. | ||||||||||
| [Expand] 
           Inherited Methods
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.lang.Object | |||||||||||
Creates and returns a copy of this Object. The default implementation returns a so-called "shallow" copy: It creates a new instance of the same class and then copies the field values (including object references) from this instance to the new instance. A "deep" copy, in contrast, would also recursively clone nested objects. A subclass that needs to implement this kind of cloning should call super.clone() to create the new instance and then create deep copies of the nested, mutable objects.
| CloneNotSupportedException | 
|---|
 This method was deprecated in API level 1.
 There is no generally accepted parameter naming convention. 
Returns the value of the parameter with the specified name.
| param | the name of the requested parameter value. | 
|---|
null.| InvalidParameterException | if paramis not a valid parameter for thisSignatureSpior an other error occurs. | 
|---|
Returns the AlgorithmParameters of this SignatureSpi instance.
AlgorithmParameters of this SignatureSpi instance, maybe null. Initializes this SignatureSpi instance for signing, using the private key of the identity whose signature is going to be generated and the specified source of randomness.
| privateKey | the private key. | 
|---|---|
| random | the SecureRandomto use. | 
| InvalidKeyException | if privateKeyis not valid. | 
|---|
Initializes this SignatureSpi instance for signing, using the private key of the identity whose signature is going to be generated.
| privateKey | the private key. | 
|---|
| InvalidKeyException | if privateKeyis not valid. | 
|---|
Initializes this SignatureSpi instance for signature verification, using the public key of the identity whose signature is going to be verified.
| publicKey | the public key. | 
|---|
| InvalidKeyException | if publicKeyis not valid. | 
|---|
 This method was deprecated in API level 1.
 Use engineSetParameter(AlgorithmParameterSpec) 
Sets the specified parameter to the given value.
| param | the name of the parameter. | 
|---|---|
| value | the parameter value. | 
| InvalidParameterException | if the parameter is invalid, already set or is not allowed to be changed. | 
|---|
Sets the specified AlgorithmParameterSpec.
| params | the parameter to set. | 
|---|
| InvalidAlgorithmParameterException | if the parameter is invalid, already set or is not allowed to be changed. | 
|---|
Generates and stores the signature of all updated data in the provided byte[] at the specified position with the specified length. 
 This SignatureSpi instance is reset to the state of its last initialization for signing and thus can be used for another signature from the same identity.
| outbuf | the buffer to store the signature. | 
|---|---|
| offset | the index of the first byte in outbufto store. | 
| len | the number of bytes allocated for the signature. | 
outbuf.| SignatureException | if this SignatureSpiinstance is not initialized properly. | 
|---|---|
| IllegalArgumentException | if offsetorlenare not valid in respect tooutbuf. | 
Generates and returns the signature of all updated data.
 This SignatureSpi instance is reset to the state of its last initialization for signing and thus can be used for another signature from the same identity.
| SignatureException | if this SignatureSpiinstance is not initialized properly. | 
|---|
Updates the data to be verified or to be signed, using the specified byte.
| b | the byte to update with. | 
|---|
| SignatureException | if this SignatureSpiinstance is not initialized properly. | 
|---|
Updates the data to be verified or to be signed, using the specified ByteBuffer.
| input | the ByteBufferto update with. | 
|---|
| RuntimeException | since SignatureExceptionis not specified for this method it throws aRuntimeExceptionif underlyingengineUpdate(byte[], int, int)throwsSignatureException. | 
|---|
Updates the data to be verified or to be signed, using the given byte[], starting form the specified index for the specified length.
| b | the byte array to update with. | 
|---|---|
| off | the start index in bof the data. | 
| len | the number of bytes to use. | 
| SignatureException | if this SignatureSpiinstance is not initialized properly. | 
|---|
Indicates whether the given sigBytes starting at index offset with length bytes can be verified using the public key or a certificate of the signer. 
 This SignatureSpi instance is reset to the state of its last initialization for verifying and thus can be used to verify another signature of the same signer.
| sigBytes | the byte[]containing the signature to verify. | 
|---|---|
| offset | the start index in sigBytesof the signature | 
| length | the number of bytes allocated for the signature. | 
true if the signature was verified, false otherwise.| SignatureException | if this SignatureSpiinstance is not initialized properly. | 
|---|---|
| IllegalArgumentException | if offsetorlengthare not valid in respect tosigBytes. | 
Indicates whether the given sigBytes can be verified using the public key or a certificate of the signer. 
 This SignatureSpi instance is reset to the state of its last initialization for verifying and thus can be used to verify another signature of the same signer.
| sigBytes | the signature to verify. | 
|---|
true if the signature was verified, false otherwise.| SignatureException | if this SignatureSpiinstance is not initialized properly. | 
|---|