com.ibm.crypto.fips.provider
Class SHA
- java.lang.Object
java.security.MessageDigestSpi
com.ibm.crypto.fips.provider.SHA
All implemented interfaces:
AlgorithmStatus, java.lang.Cloneable
- public final class SHA
- extends java.security.MessageDigestSpi
- implements java.lang.Cloneable, AlgorithmStatus
Version:
1.0, 07/13/99
Author:
Janelle Zhang
Constructor Summary
Constructor and Description |
---|
SHA()
Standard constructor, creates a new SHA instance, allocates its
buffers from the heap.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
clone()
Clones this object.
|
|
engineDigest()
|
|
engineDigest(byte[] buf,int offset,int len)
|
|
engineGetDigestLength()
Return the digest length in bytes
|
|
engineReset()
|
|
engineUpdate(byte b)
Update adds the passed byte to the digested data.
|
|
engineUpdate(byte[] input,int offset,int len)
Update adds the selected part of an array of bytes to the digest.
|
|
init()
Initialize the SHA information
|
|
internalClone()
Clones this object.
|
|
internalDigest()
|
|
internalDigest(byte[] buf)
|
|
internalDigest(byte[] buf,int offset,int len)
|
|
internalGetDigestLength()
Return the digest length in bytes
|
|
internalInit()
Initialize the SHA information
|
|
internalReset()
|
|
internalUpdate(byte b)
Update adds the passed byte to the digested data.
|
|
internalUpdate(byte[] input,int offset,int len)
Update adds the selected part of an array of bytes to the digest.
|
|
isFipsApproved()
|
Methods inherited from class java.security.MessageDigestSpi |
---|
engineUpdate |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
SHA
- public SHA()
Standard constructor, creates a new SHA instance, allocates its
buffers from the heap.
Method Detail
isFipsApproved
- public boolean isFipsApproved()
Description copied from interface:
AlgorithmStatus
Module identifies if the cryptographic operation (algorithm) is FIPS certified
Specified by:
isFipsApproved
in interface AlgorithmStatus
See Also:
init
- public void init()
Initialize the SHA information
Throws:
FIPSRuntimeException
- if SelfTest.isFipsRunnable returns false. internalInit
- protected void internalInit()
Initialize the SHA information
engineReset
- protected void engineReset()
Specified by:
engineReset
in class java.security.MessageDigestSpi
Throws:
FIPSRuntimeException
- if SelfTest.isFipsRunnable returns false. internalReset
- protected void internalReset()
engineGetDigestLength
- protected int engineGetDigestLength( )
Return the digest length in bytes
Overrides:
engineGetDigestLength
in class java.security.MessageDigestSpi
Throws:
FIPSRuntimeException
- if SelfTest.isFipsRunnable returns false. internalGetDigestLength
- protected int internalGetDigestLength( )
Return the digest length in bytes
engineUpdate
- protected void engineUpdate(byte b)
Update adds the passed byte to the digested data.
Specified by:
engineUpdate
in class java.security.MessageDigestSpi
Throws:
FIPSRuntimeException
- if SelfTest.isFipsRunnable returns false. internalUpdate
- protected void internalUpdate(byte b)
Update adds the passed byte to the digested data.
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:
engineUpdate
in class java.security.MessageDigestSpi
Throws:
FIPSRuntimeException
- if SelfTest.isFipsRunnable returns false. internalUpdate
- protected void internalUpdate(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.
engineDigest
- protected byte[] engineDigest()
Specified by:
engineDigest
in class java.security.MessageDigestSpi
Throws:
FIPSRuntimeException
- if SelfTest.isFipsRunnable returns false. internalDigest
- protected byte[] internalDigest( )
engineDigest
- protected int engineDigest(byte[] buf,
- int offset,
- int len)
- throws java.security.DigestException
Overrides:
engineDigest
in class java.security.MessageDigestSpi
Throws:
FIPSRuntimeException
- if SelfTest.isFipsRunnable returns false. java.security.DigestException
internalDigest
- protected int internalDigest(byte[] buf,
- int offset,
- int len)
- throws java.security.DigestException
Throws:
java.security.DigestException
internalDigest
- protected byte[] internalDigest( byte[] buf)
- throws java.security.DigestException
Throws:
java.security.DigestException
clone
- public java.lang.Object clone()
Clones this object.
Overrides:
clone
in class java.security.MessageDigestSpi
Throws:
FIPSRuntimeException
- if SelfTest.isFipsRunnable returns false. internalClone
- protected java.lang.Object internalClone( )
Clones this object.