electric.soap.security.signature.xml.crypto
Class HMACwithSHA1
java.lang.Object
electric.soap.security.signature.xml.crypto.HMACwithSHA1
- All Implemented Interfaces:
- ISignatureAlgorithm
- public class HMACwithSHA1
- extends java.lang.Object
- implements ISignatureAlgorithm
HMACwithSHA1 . This class is only usable with JDK 1.4
and above, since it depends on the javax.crypto.Mac class. This
is not a normal public key signature, and does not provide
non-repudiation evidence. Since the secret key that signed the
messeage is required to verify the signature, anyone who can
verify the signature can also generate new signatures.
This algorithm is identified by the URI
"http://www.w3.org/2000/09/xmldsig#hmac-sha1".
- Author:
- webMethods
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HMACwithSHA1
public HMACwithSHA1()
verify
public boolean verify(XMLSignature signature,
SecurityToken securityToken,
byte[] bytesToSign,
byte[] messageSignature)
throws XMLSignatureException
- Specified by:
verify
in interface ISignatureAlgorithm
- Parameters:
securityToken
- signature
- messageSignature
- bytesToSign
-
- Returns:
- true if the signature is consistent with the security
token, false otherwise.
- Throws:
XMLSignatureException
sign
public byte[] sign(XMLSignature signature,
SecurityToken securityToken,
byte[] bytesToSign)
throws XMLSignatureException
- Specified by:
sign
in interface ISignatureAlgorithm
- Parameters:
signature
- securityToken
- bytesToSign
-
- Returns:
- the signature as a byte array.
- Throws:
XMLSignatureException
copyright© 2001-2004 by webMethods All Rights Reserved.