com.ibm.crypto.hdwrCCA.provider
Class AbstractFullHardwareSHA
- java.lang.Object
-
- java.security.MessageDigestSpi
-
- com.ibm.crypto.hdwrCCA.provider.AbstractFullHardwareSHA
-
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- FullHardwareSHA, FullHardwareSHA224, FullHardwareSHA256, FullHardwareSHA384, FullHardwareSHA512
public abstract class AbstractFullHardwareSHA extends java.security.MessageDigestSpi implements java.lang.CloneableThis class contains implementations of methods that are common to the SHA MessageDigest algorithms and abstract methods that behave differently from one SHA algorithm to another. It is implemented by the following: FullHardwareSHA FullHardwareSHA224 FullHardwareSHA256 FullHardwareSHA384 FullHardwareSHA512
-
-
Field Summary
Fields Modifier and Type Field and Description protected java.lang.Stringalg
-
Constructor Summary
Constructors Modifier Constructor and Description protectedAbstractFullHardwareSHA(java.lang.String algorithm, int sha_length, byte[] init_state)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()Clones this object.protected byte[]engineDigest()protected intengineDigest(byte[] buf, int offset, int len)protected abstract intengineGetDigestBlockSize()protected intengineGetDigestLength()Return the digest length in bytesprotected voidengineReset()protected voidengineUpdate(byte b)Update adds the passed byte to the digested data.protected voidengineUpdate(byte[] input, int offset, int len)Update adds the selected part of an array of bytes to the digest.static booleanisSupportedByHardware(java.lang.String algorithm)
-
-
-
Constructor Detail
-
AbstractFullHardwareSHA
protected AbstractFullHardwareSHA(java.lang.String algorithm, int sha_length, byte[] init_state)
-
-
Method Detail
-
engineReset
protected void engineReset()
- Specified by:
engineResetin classjava.security.MessageDigestSpi
-
engineGetDigestLength
protected int engineGetDigestLength()
Return the digest length in bytes- Overrides:
engineGetDigestLengthin classjava.security.MessageDigestSpi
-
engineGetDigestBlockSize
protected abstract int engineGetDigestBlockSize()
-
engineUpdate
protected void engineUpdate(byte b)
Update adds the passed byte to the digested data.- Specified by:
engineUpdatein classjava.security.MessageDigestSpi
-
engineUpdate
protected void engineUpdate(byte[] input, int offset, int len)Update adds the selected part of an array of bytes to the digest. This version is more efficient than the byte-at-a-time version; it avoids data copies and reduces per-byte call overhead.- Specified by:
engineUpdatein classjava.security.MessageDigestSpi
-
engineDigest
protected byte[] engineDigest()
- Specified by:
engineDigestin classjava.security.MessageDigestSpi
-
engineDigest
protected int engineDigest(byte[] buf, int offset, int len) throws java.security.DigestException- Overrides:
engineDigestin classjava.security.MessageDigestSpi- Throws:
java.security.DigestException
-
clone
public java.lang.Object clone()
Clones this object.- Overrides:
clonein classjava.security.MessageDigestSpi
-
isSupportedByHardware
public static boolean isSupportedByHardware(java.lang.String algorithm)
-
-