public class Sha224 extends java.lang.Object implements IMessageDigest
block word digest
SHA-1 512 32 160
SHA-224 512 32 224
SHA-256 512 32 256
SHA-384 1024 64 384
SHA-512 1024 64 512
| Constructor and Description |
|---|
Sha224()
Standard constructor
|
Sha224(Sha224 t)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
blockSize()
Returns the algorithm's (inner) block size in bytes.
|
java.lang.Object |
clone()
Returns a clone copy of this instance.
|
byte[] |
digest()
Completes the message digest by performing final operations such as
padding and resetting the instance.
|
int |
doFinal(byte[] out,
int outOff) |
void |
finish() |
int |
hashSize()
Returns the output length in bytes of this message digest algorithm.
|
static void |
intToBigEndian(int n,
byte[] bs,
int off) |
static void |
main(java.lang.String[] args) |
java.lang.String |
name()
Returns the canonical name of this algorithm.
|
protected void |
processBlock() |
protected void |
processLength(long bitLength) |
protected void |
processWord(byte[] in,
int inOff) |
void |
reset()
reset the chaining variables
|
boolean |
selfTest()
A basic test.
|
void |
update(byte in)
Continues a message digest operation using the input byte.
|
void |
update(byte[] in,
int inOff,
int len)
Continues a message digest operation, by filling the buffer, processing
data in the algorithm's HASH_SIZE-bit block(s), updating the context and
count, and buffering the remaining bytes in buffer for the next
operation.
|
public Sha224()
public Sha224(Sha224 t)
public java.lang.Object clone()
IMessageDigestReturns a clone copy of this instance.
clone in interface IMessageDigestclone in class java.lang.Objectpublic java.lang.String name()
IMessageDigestReturns the canonical name of this algorithm.
name in interface IMessageDigestpublic int hashSize()
IMessageDigestReturns the output length in bytes of this message digest algorithm.
hashSize in interface IMessageDigestpublic int blockSize()
IMessageDigestReturns the algorithm's (inner) block size in bytes.
blockSize in interface IMessageDigestpublic byte[] digest()
IMessageDigestCompletes the message digest by performing final operations such as padding and resetting the instance.
digest in interface IMessageDigestpublic boolean selfTest()
IMessageDigestA basic test. Ensures that the digest of a pre-determined message is equal to a known pre-computed value.
selfTest in interface IMessageDigestpublic void reset()
reset in interface IMessageDigestprotected void processWord(byte[] in,
int inOff)
protected void processLength(long bitLength)
public int doFinal(byte[] out,
int outOff)
protected void processBlock()
public static void intToBigEndian(int n,
byte[] bs,
int off)
public void update(byte in)
IMessageDigestContinues a message digest operation using the input byte.
update in interface IMessageDigestin - the input byte to digest.public void update(byte[] in,
int inOff,
int len)
IMessageDigestContinues a message digest operation, by filling the buffer, processing data in the algorithm's HASH_SIZE-bit block(s), updating the context and count, and buffering the remaining bytes in buffer for the next operation.
update in interface IMessageDigestin - the input block.inOff - start of meaningful bytes in input block.len - number of bytes, in input block, to consider.public void finish()
public static void main(java.lang.String[] args)
Copyright © 2025. All rights reserved.