Class IntegrityHmac
java.lang.Object
org.apache.xml.security.algorithms.SignatureAlgorithmSpi
org.apache.xml.security.algorithms.implementations.IntegrityHmac
- Direct Known Subclasses:
IntegrityHmac.IntegrityHmacMD5
,IntegrityHmac.IntegrityHmacRIPEMD160
,IntegrityHmac.IntegrityHmacSHA1
,IntegrityHmac.IntegrityHmacSHA224
,IntegrityHmac.IntegrityHmacSHA256
,IntegrityHmac.IntegrityHmacSHA384
,IntegrityHmac.IntegrityHmacSHA512
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class IntegrityHmacMD5static class
Class IntegrityHmacRIPEMD160static class
Class IntegrityHmacSHA1static class
Class IntegrityHmacSHA224static class
Class IntegrityHmacSHA256static class
Class IntegrityHmacSHA384static class
Class IntegrityHmacSHA512 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
engineAddContextToElement
(Element element) Method engineAddContextToElementprotected void
engineGetContextFromElement
(Element element) Method engineGetContextFromElementprotected String
Method engineGetJCEAlgorithmString Proxy method forSignature.getAlgorithm()
which is executed on the internalSignature
object.protected String
Method engineGetJCEAlgorithmString Method engineGetJCEProviderNameabstract String
Method engineGetURI Returns the URI representation ofTransformation algorithm
protected void
engineInitSign
(Key secretKey) Method engineInitSignprotected void
engineInitSign
(Key secretKey, SecureRandom secureRandom) Method engineInitSignprotected void
engineInitSign
(Key secretKey, AlgorithmParameterSpec algorithmParameterSpec) Method engineInitSignprotected void
engineInitVerify
(Key secretKey) Proxy method forSignature.initVerify(java.security.PublicKey)
which is executed on the internalSignature
object.protected void
engineSetHMACOutputLength
(int HMACOutputLength) Method engineSetHMACOutputLengthprotected void
Proxy method forSignature.setParameter(java.security.spec.AlgorithmParameterSpec)
which is executed on the internalSignature
object.protected byte[]
Proxy method forSignature.sign()
which is executed on the internalSignature
object.protected void
engineUpdate
(byte input) Proxy method forSignature.update(byte)
which is executed on the internalSignature
object.protected void
engineUpdate
(byte[] input) Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.protected void
engineUpdate
(byte[] buf, int offset, int len) Proxy method forSignature.update(byte[], int, int)
which is executed on the internalSignature
object.protected boolean
engineVerify
(byte[] signature) Proxy method forSignature.verify(byte[])
which is executed on the internalSignature
object.void
reset()
-
Constructor Details
-
IntegrityHmac
Method IntegrityHmac- Throws:
XMLSignatureException
-
-
Method Details
-
engineGetURI
Method engineGetURI Returns the URI representation ofTransformation algorithm
- Specified by:
engineGetURI
in classSignatureAlgorithmSpi
- Returns:
- the URI representation of
Transformation algorithm
-
engineSetParameter
Proxy method forSignature.setParameter(java.security.spec.AlgorithmParameterSpec)
which is executed on the internalSignature
object.- Specified by:
engineSetParameter
in classSignatureAlgorithmSpi
- Parameters:
params
-- Throws:
XMLSignatureException
-
reset
public void reset()- Overrides:
reset
in classSignatureAlgorithmSpi
-
engineVerify
Proxy method forSignature.verify(byte[])
which is executed on the internalSignature
object.- Specified by:
engineVerify
in classSignatureAlgorithmSpi
- Parameters:
signature
-- Returns:
- true if the signature is correct
- Throws:
XMLSignatureException
-
engineInitVerify
Proxy method forSignature.initVerify(java.security.PublicKey)
which is executed on the internalSignature
object.- Specified by:
engineInitVerify
in classSignatureAlgorithmSpi
- Parameters:
secretKey
-- Throws:
XMLSignatureException
-
engineSign
Proxy method forSignature.sign()
which is executed on the internalSignature
object.- Specified by:
engineSign
in classSignatureAlgorithmSpi
- Returns:
- the result of the
Signature.sign()
method - Throws:
XMLSignatureException
-
engineInitSign
Method engineInitSign- Specified by:
engineInitSign
in classSignatureAlgorithmSpi
- Parameters:
secretKey
-- Throws:
XMLSignatureException
-
engineInitSign
protected void engineInitSign(Key secretKey, AlgorithmParameterSpec algorithmParameterSpec) throws XMLSignatureException Method engineInitSign- Specified by:
engineInitSign
in classSignatureAlgorithmSpi
- Parameters:
secretKey
-algorithmParameterSpec
-- Throws:
XMLSignatureException
-
engineInitSign
protected void engineInitSign(Key secretKey, SecureRandom secureRandom) throws XMLSignatureException Method engineInitSign- Specified by:
engineInitSign
in classSignatureAlgorithmSpi
- Parameters:
secretKey
-secureRandom
-- Throws:
XMLSignatureException
-
engineUpdate
Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.- Specified by:
engineUpdate
in classSignatureAlgorithmSpi
- Parameters:
input
-- Throws:
XMLSignatureException
-
engineUpdate
Proxy method forSignature.update(byte)
which is executed on the internalSignature
object.- Specified by:
engineUpdate
in classSignatureAlgorithmSpi
- Parameters:
input
-- Throws:
XMLSignatureException
-
engineUpdate
Proxy method forSignature.update(byte[], int, int)
which is executed on the internalSignature
object.- Specified by:
engineUpdate
in classSignatureAlgorithmSpi
- Parameters:
buf
-offset
-len
-- Throws:
XMLSignatureException
-
engineGetJCEAlgorithmString
Method engineGetJCEAlgorithmString Proxy method forSignature.getAlgorithm()
which is executed on the internalSignature
object.- Specified by:
engineGetJCEAlgorithmString
in classSignatureAlgorithmSpi
- Returns:
- the result of the
Signature.getAlgorithm()
method
-
engineGetJCEProviderName
Method engineGetJCEAlgorithmString Method engineGetJCEProviderName- Specified by:
engineGetJCEProviderName
in classSignatureAlgorithmSpi
- Returns:
- the JCE ProviderName
-
engineSetHMACOutputLength
protected void engineSetHMACOutputLength(int HMACOutputLength) Method engineSetHMACOutputLength- Specified by:
engineSetHMACOutputLength
in classSignatureAlgorithmSpi
- Parameters:
HMACOutputLength
-
-
engineGetContextFromElement
Method engineGetContextFromElement- Overrides:
engineGetContextFromElement
in classSignatureAlgorithmSpi
- Parameters:
element
-
-
engineAddContextToElement
Method engineAddContextToElement- Parameters:
element
-
-