electric.soap.security.signature.xml.crypto
Class SHA1withRSA

java.lang.Object
  extended byelectric.soap.security.signature.xml.crypto.SHA1withRSA
All Implemented Interfaces:
ISignatureAlgorithm

public class SHA1withRSA
extends java.lang.Object
implements ISignatureAlgorithm

SHA1withRSA Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1".

Author:
webMethods

Constructor Summary
SHA1withRSA()
           
 
Method Summary
 byte[] sign(XMLSignature signature, SecurityToken securityToken, byte[] bytesToSign)
          Sign an array of bytes wit the given security token using the SHA1withRSA signature algorithm.
 boolean verify(XMLSignature signature, SecurityToken securityToken, byte[] bytesToSign, byte[] messageSignature)
          SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHA1withRSA

public SHA1withRSA()
Method Detail

verify

public boolean verify(XMLSignature signature,
                      SecurityToken securityToken,
                      byte[] bytesToSign,
                      byte[] messageSignature)
               throws XMLSignatureException
SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1".

Specified by:
verify in interface ISignatureAlgorithm
Parameters:
securityToken -
signature -
messageSignature -
bytesToSign -
Returns:
true if the signature is consistent with the given security token, false otherwise.
Throws:
XMLSignatureException

sign

public byte[] sign(XMLSignature signature,
                   SecurityToken securityToken,
                   byte[] bytesToSign)
            throws XMLSignatureException
Sign an array of bytes wit the given security token using the SHA1withRSA signature algorithm.

Specified by:
sign in interface ISignatureAlgorithm
Parameters:
signature -
securityToken -
bytesToSign -
Returns:
the signature as an array of bytes.
Throws:
XMLSignatureException


copyright© 2001-2004 by webMethods All Rights Reserved.