|
Oracle Security Developer Tools Crypto Java API Reference 11g (11.1.1) E10668-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.core.MessageDigest
oracle.security.crypto.core.SHA
public final class SHA
The SHA (Secure Hash Algorithm) message digest algorithms, as defined in FIPS-180-2 Secure Hash Standard. This class implements SHA-1, SHA-256, SHA-384 and SHA-512.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.security.crypto.core.MessageDigest |
---|
MessageDigest.MDState |
Field Summary |
---|
Fields inherited from class oracle.security.crypto.core.MessageDigest |
---|
algID |
Constructor Summary | |
---|---|
SHA() Empty constructor. |
Method Summary | |
---|---|
java.lang.String |
algName() Returns the algorithm name of this message digest. |
int |
blockSize() Returns the block size the message digest. |
java.lang.Object |
clone() Clone this object. |
void |
computeCurrent() Completes the hash computation, performing any necessary operations such as padding. |
AlgorithmIdentifier |
getAlgID() Returns the algorithm identifier of this message digest. |
byte[] |
getDigestBits() Returns a copy of the current digest bytes. |
int |
getDigestLength() Returns the length in bytes of the message digest. |
protected MessageDigest.MDState |
getState() Gets the state of this MessageDigest instance. |
void |
init() Resets this message digest object to its initial state. |
boolean |
isValid() Returns true if this SHA is in a valid state and its digest bits are usable; otherwise returns false . |
void |
setAlgID(AlgorithmIdentifier algID) Sets the SHA algorithm to use. |
protected void |
setState(MessageDigest.MDState state) Sets the state of this MessageDigest instance. |
void |
update(byte aValue) Adds one byte to the data being digested. |
void |
update(byte[] input, int off, int len) Adds the specified sequence of bytes to the data being digested. |
Methods inherited from class oracle.security.crypto.core.MessageDigest |
---|
computeDigest, computeDigest, getInstance, isEqual, toString, update, update, update, update, update, update, update, update, update, update, update, updateASCII |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SHA()
SHA
object will implement the SHA-1 algorithm. To use another SHA algorithm, use the setAlgID
method.Method Detail |
---|
public void setAlgID(AlgorithmIdentifier algID) throws AlgorithmIdentifierException
setAlgID
in class MessageDigest
algID
- The AlgorithmIdentifier to use.AlgorithmIdentifierException
AlgID
public AlgorithmIdentifier getAlgID()
getAlgID
in class MessageDigest
public java.lang.String algName()
algName
in class MessageDigest
public int blockSize()
blockSize
in class MessageDigest
public int getDigestLength()
getDigestLength
in class MessageDigest
public void init()
init
in class MessageDigest
public void update(byte[] input, int off, int len)
update
in class MessageDigest
input
- the input arrayoff
- start position in the input arraylen
- the number of input array elements to add to the data being digestedpublic void update(byte aValue)
update
in class MessageDigest
public byte[] getDigestBits()
getDigestBits
in class MessageDigest
public boolean isValid()
true
if this SHA
is in a valid state and its digest bits are usable; otherwise returns false
.isValid
in class MessageDigest
public void computeCurrent()
digestBits
.computeCurrent
in class MessageDigest
public java.lang.Object clone()
clone
in class MessageDigest
protected MessageDigest.MDState getState()
MessageDigest
getState
in class MessageDigest
protected void setState(MessageDigest.MDState state)
MessageDigest
setState
in class MessageDigest
|
Oracle Security Developer Tools Crypto Java API Reference 11g (11.1.1) E10668-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |