com.motorola.iden.provider
Class MD5withRSA
java.lang.Object
|
+--com.motorola.iden.security.SignatureSpi
|
+--com.motorola.iden.provider.MD5withRSA
- public class MD5withRSA
- extends SignatureSpi
This class provides MD5withRSA key sign algoirthm.
MOTOROLA and the Stylized M Logo are registered trademarks of
Motorola, Inc. Reg. U.S. Pat. & Tm. Off.
© Copyright 2002 - 2004 Motorola, Inc. All Rights Reserved.
- See Also:
[CipherSpi]
Method Summary |
protected void |
engineInitSign(PrivateKey privateKey)
Initializes this signature object with the specified
private key for signing operations.
|
protected void |
engineInitVerify(PublicKey publicKey)
Initializes this signature object with the specified
public key for verification operations.
|
protected void |
engineSetParameter(AlgorithmParameterSpec params)
This method is overridden by providers to initialize
this signature engine with the specified parameter set. |
protected byte[] |
engineSign()
Returns the signature bytes of the input data
The format of the signature depends on the underlying
signature scheme.
|
protected void |
engineUpdate(byte[] b,
int off,
int len)
Updates the data to be signed or verified, using the
specified array of bytes, starting at the specified offset.
|
protected boolean |
engineVerify(byte[] sigBytes)
Verifies the passed-in signature.
|
protected void |
finalize()
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MD5withRSA
public MD5withRSA()
engineInitSign
protected void engineInitSign(PrivateKey privateKey)
throws InvalidKeyException
- Initializes this signature object with the specified
private key for signing operations.
- Overrides:
engineInitSign
in class SignatureSpi
- Parameters:
privateKey
- the private key of the identity whose signature
will be generated.
- Throws:
InvalidKeyException
- if the key is improperly
encoded, parameters are missing, and so on.
will be generated.
engineInitVerify
protected void engineInitVerify(PublicKey publicKey)
throws InvalidKeyException
- Initializes this signature object with the specified
public key for verification operations.
- Overrides:
engineInitVerify
in class SignatureSpi
- Parameters:
publicKey
- the public key of the identity whose signature is
going to be verified.
- Throws:
InvalidKeyException
- if the key is improperly
encoded, parameters are missing, and so on.
engineUpdate
protected void engineUpdate(byte[] b,
int off,
int len)
throws SignatureException
- Updates the data to be signed or verified, using the
specified array of bytes, starting at the specified offset.
- Overrides:
engineUpdate
in class SignatureSpi
- Parameters:
b
- the array of bytesoff
- the offset to start from in the array of byteslen
- the number of bytes to use, starting at offset
- Throws:
SignatureException
- if the engine is not initialized
properly
engineSign
protected byte[] engineSign()
throws SignatureException
- Returns the signature bytes of the input data
The format of the signature depends on the underlying
signature scheme.
- Overrides:
engineSign
in class SignatureSpi
- Returns:
- the signature bytes of the signing operation's result.
- Throws:
SignatureException
- if the engine is not
initialized properly.
engineVerify
protected boolean engineVerify(byte[] sigBytes)
throws SignatureException
- Verifies the passed-in signature.
- Overrides:
engineVerify
in class SignatureSpi
- Parameters:
sigBytes
- the signature bytes to be verified.input
- the message to be verified.
- Returns:
- true if the signature was verified, false if not.
- Throws:
SignatureException
- if the engine is not initialized
properly, or the passed-in signature is improperly encoded or
of the wrong type, etc.
engineSetParameter
protected final void engineSetParameter(AlgorithmParameterSpec params)
throws InvalidAlgorithmParameterException
This method is overridden by providers to initialize
this signature engine with the specified parameter set.
- Overrides:
engineSetParameter
in class SignatureSpi
- Parameters:
params
- the parameters- Throws:
InvalidAlgorithmParameterException
- if given parameters
are inappropriate for this signature engine
finalize
protected void finalize()
- Overrides:
finalize
in class java.lang.Object