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()
IMessageDigest
Returns a clone copy of this instance.
clone
in interface IMessageDigest
clone
in class java.lang.Object
public java.lang.String name()
IMessageDigest
Returns the canonical name of this algorithm.
name
in interface IMessageDigest
public int hashSize()
IMessageDigest
Returns the output length in bytes of this message digest algorithm.
hashSize
in interface IMessageDigest
public int blockSize()
IMessageDigest
Returns the algorithm's (inner) block size in bytes.
blockSize
in interface IMessageDigest
public byte[] digest()
IMessageDigest
Completes the message digest by performing final operations such as padding and resetting the instance.
digest
in interface IMessageDigest
public boolean selfTest()
IMessageDigest
A basic test. Ensures that the digest of a pre-determined message is equal to a known pre-computed value.
selfTest
in interface IMessageDigest
public void reset()
reset
in interface IMessageDigest
protected 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)
IMessageDigest
Continues a message digest operation using the input byte.
update
in interface IMessageDigest
in
- the input byte to digest.public void update(byte[] in, int inOff, int len)
IMessageDigest
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.
update
in interface IMessageDigest
in
- 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.