|
XML Security, 1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xml.crypto.dsig.SignatureEngineRSA
public class SignatureEngineRSA
Constructor Summary | |
---|---|
SignatureEngineRSA(java.lang.String u,
java.security.Provider provider)
|
Method Summary | |
---|---|
java.lang.String |
getURI()
Return the algorithm identifier. |
void |
initSign(java.security.Key key)
Initialize for signing. |
void |
initVerify(java.security.Key key)
Initialize for verification. |
void |
setParameter(java.security.spec.AlgorithmParameterSpec spec)
Set an instance of AlgorithmParameterSpec extracted from
the content of<ds:SignatureMethod>. |
byte[] |
sign()
Finish to sign, and return the signature value. |
void |
update(byte[] data)
Add signed/verified data. |
void |
update(byte[] data,
int off,
int len)
Add signed/verified data using the byte array, starting offset in the array, and the length. |
boolean |
verify(byte[] signature)
Finish to verify, and return the validity against the specified signature value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SignatureEngineRSA(java.lang.String u, java.security.Provider provider) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
Method Detail |
---|
public void setParameter(java.security.spec.AlgorithmParameterSpec spec) throws java.security.InvalidAlgorithmParameterException
SignatureEngine
AlgorithmParameterSpec
extracted from
the content of<ds:SignatureMethod>.
setParameter
in interface SignatureEngine
spec
- algorithm parameter. It may be null
java.security.InvalidAlgorithmParameterException
EngineFactory.unmarshalParameter(String, org.w3c.dom.Element)
public java.lang.String getURI()
SignatureEngine
getURI
in interface SignatureEngine
public void initSign(java.security.Key key) throws java.security.InvalidKeyException
SignatureEngine
initSign
in interface SignatureEngine
key
- Signing key. For asymmetric signature algorithms,
it would be an instance of PrivateKey
.
java.security.InvalidKeyException
Signature.initSign(java.security.PrivateKey)
public void initVerify(java.security.Key key) throws java.security.InvalidKeyException
SignatureEngine
initVerify
in interface SignatureEngine
key
- Verification key. For asymmetric signature algorithms,
it would be an instance of PublicKey
.
java.security.InvalidKeyException
Signature.initVerify(java.security.PublicKey)
public void update(byte[] data) throws java.security.SignatureException
SignatureEngine
update(data, 0, data.length)
.
update
in interface SignatureEngine
data
- data to be signed or verified
java.security.SignatureException
Signature.update(byte[])
public void update(byte[] data, int off, int len) throws java.security.SignatureException
SignatureEngine
update
in interface SignatureEngine
data
- data to be signed or verifiedoff
- starting offset in the datalen
- the length to be processed
java.security.SignatureException
Signature.update(byte[], int, int)
public byte[] sign() throws java.security.SignatureException
SignatureEngine
sign
in interface SignatureEngine
java.security.SignatureException
Signature.sign()
public boolean verify(byte[] signature) throws java.security.SignatureException
SignatureEngine
verify
in interface SignatureEngine
signature
- binary representation of the content of <ds:SignatureValue>
true
if the signature is matched.
java.security.SignatureException
Signature.verify(byte[])
|
XML Security, 1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |