All Packages Class Hierarchy This Package Previous Next Index
Class iaik.security.rsa.SSLRSASignature
java.lang.Object
|
+----java.security.Signature
|
+----iaik.security.rsa.SSLRSASignature
- public class SSLRSASignature
- extends Signature
This class implements a special form of a RSA Signature as defined in SSL v3.0.
- See Also:
- Md5RSASignature, ShaRSASignature
-
md5
-
-
sha
-
-
SSLRSASignature()
- The default constructor.
-
engineGetParameter(String)
- SPI: Gets the value of the specified algorithm parameter.
-
engineInitSign(PrivateKey)
- SPI:Initializes this signature object with the specified
private key for signing operations.
-
engineInitVerify(PublicKey)
- SPI: Initializes this signature object with the specified
public key for verification operations.
-
engineSetParameter(String, Object)
- SPI: Sets the specified algorithm parameter to the specified
value.
-
engineSign()
- SPI: Returns the signature bytes of all the data
updated so far.
-
engineUpdate(byte)
- SPI: Updates the data to be signed or verified
using the specified byte.
-
engineUpdate(byte[], int, int)
- SPI: Updates the data to be signed or verified, using the
specified array of bytes, starting at the specified offset.
-
engineVerify(byte[])
- Verifies the signature of a message defined in SSL v3.0.
md5
protected MessageDigest md5
sha
protected MessageDigest sha
SSLRSASignature
public SSLRSASignature() throws NoSuchAlgorithmException
- The default constructor. Creates a new SSL/RSA Signature object.
- Throws: NoSuchAlgorithmException
- if there is no implementation for MD5 or SHA
engineInitVerify
protected void engineInitVerify(PublicKey pk) throws InvalidKeyException
- SPI: Initializes this signature object with the specified
public key for verification operations.
- Parameters:
- publicKey - a public key.
- Throws: InvalidKeyException
- if the key is improperly
encoded, parameters are missing, and so on.
- Overrides:
- engineInitVerify in class Signature
engineInitSign
protected void engineInitSign(PrivateKey pk) throws InvalidKeyException
- SPI:Initializes this signature object with the specified
private key for signing operations.
- Parameters:
- privateKey - a private key.
- Throws: InvalidKeyException
- if the key is improperly
encoded, parameters are missing, and so on.
- Overrides:
- engineInitSign in class Signature
engineSign
protected byte[] engineSign() throws SignatureException
- SPI: Returns the signature bytes of all the data
updated so far. The signature is returned as defined in SSL v3.0.
- Returns:
- the signature bytes of the signing operation's result.
- Throws: SignatureException
- if the signature is not
initialized properly or an other problem occurs.
- Overrides:
- engineSign in class Signature
engineVerify
protected boolean engineVerify(byte sigBytes[]) throws SignatureException
- Verifies the signature of a message defined in SSL v3.0.
- Parameters:
- sigBytes - the RSA encrypted digest
- Returns:
- true if signature is OK
- Throws: SignatureException
- if the signature is not initialized
properly, or it is improperly encoded or of the wrong type, etc.
- Overrides:
- engineVerify in class Signature
engineUpdate
protected void engineUpdate(byte b)
- SPI: Updates the data to be signed or verified
using the specified byte.
- Parameters:
- b - the byte to update.
- Overrides:
- engineUpdate in class Signature
engineUpdate
protected void engineUpdate(byte b[],
int off,
int len)
- SPI: Updates the data to be signed or verified, using the
specified array of bytes, starting at the specified offset.
- Parameters:
- data - 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.
- Overrides:
- engineUpdate in class Signature
engineSetParameter
protected void engineSetParameter(String param,
Object value) throws InvalidParameterException
- SPI: Sets the specified algorithm parameter to the specified
value. This method is not implemented.
- Overrides:
- engineSetParameter in class Signature
engineGetParameter
protected Object engineGetParameter(String param) throws InvalidParameterException
- SPI: Gets the value of the specified algorithm parameter.
This method is not implemented.
- Overrides:
- engineGetParameter in class Signature
All Packages Class Hierarchy This Package Previous Next Index