23#if !defined(__HASHA_SHA2_H)
27#ifdef HA_SHA2_ALIAS_MAP
28#define sha224 sha2_256
29#define sha256 sha2_256
30#define sha384 sha2_384
31#define sha512 sha2_512
42#define HA_SHA2_224_BLOCK_SIZE 64
49#define HA_SHA2_224_DIGEST_SIZE ha_bB(224)
56#define HA_SHA2_256_BLOCK_SIZE 64
63#define HA_SHA2_256_DIGEST_SIZE ha_bB(256)
70#define HA_SHA2_384_BLOCK_SIZE 128
77#define HA_SHA2_384_DIGEST_SIZE ha_bB(384)
84#define HA_SHA2_512_BLOCK_SIZE 128
91#define HA_SHA2_512_DIGEST_SIZE ha_bB(512)
98#define HA_SHA2_512_224_BLOCK_SIZE 128
105#define HA_SHA2_512_224_DIGEST_SIZE ha_bB(224)
112#define HA_SHA2_512_256_BLOCK_SIZE 128
119#define HA_SHA2_512_256_DIGEST_SIZE ha_bB(256)
HA_PUBFUN void ha_sha2_224_hash(ha_inbuf_t data, size_t length, ha_digest_t digest)
Computes the SHA-2 224-bit hash in a one-shot operation.
HA_PUBFUN void ha_sha2_256_final(ha_sha2_256_context *ctx, ha_digest_t digest)
Finalizes the SHA-2 256-bit computation and produces the hash digest.
HA_PUBFUN void ha_sha2_256_transform(ha_sha2_256_context *ctx, ha_inbuf_t data)
Transforms the data in the SHA-2 256-bit context.
HA_PUBFUN void ha_sha2_384_hash(ha_inbuf_t data, size_t length, ha_digest_t digest)
Computes the SHA-2 384-bit hash in a one-shot operation.
HA_PUBFUN void ha_sha2_512_224_update(ha_sha2_512_224_context *ctx, ha_inbuf_t data, size_t length)
Updates the SHA-2 512-224-bit context with new data.
HA_PUBFUN void ha_sha2_512_256_hash(ha_inbuf_t data, size_t length, ha_digest_t digest)
Computes the SHA-2 512-256-bit hash in a one-shot operation.
HA_PUBFUN void ha_sha2_512_256_transform(ha_sha2_512_256_context *ctx, ha_inbuf_t data)
Transforms the data in the SHA-2 512-256-bit context.
HA_PUBFUN void ha_sha2_512_transform(ha_sha2_512_context *ctx, ha_inbuf_t data)
Transforms the data in the SHA-2 512-bit context.
HA_PUBFUN void ha_sha2_512_final(ha_sha2_512_context *ctx, ha_digest_t digest)
Finalizes the SHA-2 512-bit computation and produces the hash digest.
HA_PUBFUN void ha_sha2_512_256_final(ha_sha2_512_256_context *ctx, ha_digest_t digest)
Finalizes the SHA-2 512-256-bit computation and produces the hash digest.
#define HA_SHA2_512_256_BLOCK_SIZE
The block size in bytes for the SHA-2 512-256 algorithm (128 bytes).
HA_PUBFUN void ha_sha2_512_224_hash(ha_inbuf_t data, size_t length, ha_digest_t digest)
Computes the SHA-2 512-224-bit hash in a one-shot operation.
HA_PUBFUN void ha_sha2_224_final(ha_sha2_224_context *ctx, ha_digest_t digest)
Finalizes the SHA-2 224-bit computation and produces the hash digest.
HA_PUBFUN void ha_sha2_224_init(ha_sha2_224_context *ctx)
Initializes the SHA-2 224-bit context.
#define HA_SHA2_384_BLOCK_SIZE
The block size in bytes for the SHA-2 384-bit algorithm (128 bytes).
HA_PUBFUN void ha_sha2_512_224_final(ha_sha2_512_224_context *ctx, ha_digest_t digest)
Finalizes the SHA-2 512-224-bit computation and produces the hash digest.
HA_PUBFUN void ha_sha2_256_init(ha_sha2_256_context *ctx)
Initializes the SHA-2 256-bit context.
HA_PUBFUN void ha_sha2_512_256_init(ha_sha2_512_256_context *ctx)
Initializes the SHA-2 512-256-bit context.
HA_PUBFUN void ha_sha2_512_hash(ha_inbuf_t data, size_t length, ha_digest_t digest)
Computes the SHA-2 512-bit hash in a one-shot operation.
HA_PUBFUN void ha_sha2_224_update(ha_sha2_224_context *ctx, ha_inbuf_t data, size_t length)
Updates the SHA-2 224-bit context with new data.
HA_PUBFUN void ha_sha2_384_init(ha_sha2_384_context *ctx)
Initializes the SHA-2 384-bit context.
HA_PUBFUN void ha_sha2_224_transform(ha_sha2_224_context *ctx, ha_inbuf_t data)
Transforms the data in the SHA-2 224-bit context.
HA_PUBFUN void ha_sha2_384_update(ha_sha2_384_context *ctx, ha_inbuf_t data, size_t length)
Updates the SHA-2 384-bit context with new data.
#define HA_SHA2_224_BLOCK_SIZE
The block size in bytes for the SHA-2 224-bit algorithm (64 bytes).
HA_PUBFUN void ha_sha2_512_224_transform(ha_sha2_512_224_context *ctx, ha_inbuf_t data)
Transforms the data in the SHA-2 512-224-bit context.
HA_PUBFUN void ha_sha2_512_init(ha_sha2_512_context *ctx)
Initializes the SHA-2 512-bit context.
#define HA_SHA2_512_224_BLOCK_SIZE
The block size in bytes for the SHA-2 512-224 algorithm (128 bytes).
HA_PUBFUN void ha_sha2_512_update(ha_sha2_512_context *ctx, ha_inbuf_t data, size_t length)
Updates the SHA-2 512-bit context with new data.
HA_PUBFUN void ha_sha2_384_transform(ha_sha2_384_context *ctx, ha_inbuf_t data)
Transforms the data in the SHA-2 384-bit context.
HA_PUBFUN void ha_sha2_384_final(ha_sha2_384_context *ctx, ha_digest_t digest)
Finalizes the SHA-2 384-bit computation and produces the hash digest.
#define HA_SHA2_512_BLOCK_SIZE
The block size in bytes for the SHA-2 512-bit algorithm (128 bytes).
#define HA_SHA2_256_BLOCK_SIZE
The block size in bytes for the SHA-2 256-bit algorithm (64 bytes).
HA_PUBFUN void ha_sha2_256_update(ha_sha2_256_context *ctx, ha_inbuf_t data, size_t length)
Updates the SHA-2 256-bit context with new data.
HA_PUBFUN void ha_sha2_256_hash(ha_inbuf_t data, size_t length, ha_digest_t digest)
Computes the SHA-2 256-bit hash in a one-shot operation.
HA_PUBFUN void ha_sha2_512_256_update(ha_sha2_512_256_context *ctx, ha_inbuf_t data, size_t length)
Updates the SHA-2 512-256-bit context with new data.
HA_PUBFUN void ha_sha2_512_224_init(ha_sha2_512_224_context *ctx)
Initializes the SHA-2 512-224-bit context.
Context structure for SHA-2 224-bit hashing.
uint8_t buffer[HA_SHA2_224_BLOCK_SIZE]
Context structure for SHA-2 256-bit hashing.
uint8_t buffer[HA_SHA2_256_BLOCK_SIZE]
Context structure for SHA-2 384-bit hashing.
uint8_t buffer[HA_SHA2_384_BLOCK_SIZE]
Context structure for SHA-2 512-224-bit hashing.
uint8_t buffer[HA_SHA2_512_224_BLOCK_SIZE]
Context structure for SHA-2 512-256-bit hashing.
uint8_t buffer[HA_SHA2_512_256_BLOCK_SIZE]
Context structure for SHA-2 512-bit hashing.
uint8_t buffer[HA_SHA2_512_BLOCK_SIZE]
__ha_out_buf_type ha_digest_t
__ha_in_buf_type ha_inbuf_t