Turnstone Operating System
Loading...
Searching...
No Matches
sha2.h File Reference

SHA-2 (Secure Hash Algorithm 2) family of cryptographic hash functions. More...

#include <types.h>

Macros

#define ___SHA_H   0
 
#define SHA256_OUTPUT_SIZE   32
 
#define SHA256_BLOCK_SIZE   64
 
#define SHA256_STATE_SIZE   8
 
#define SHA224_OUTPUT_SIZE   28
 
#define SHA512_OUTPUT_SIZE   64
 
#define SHA512_BLOCK_SIZE   128
 
#define SHA512_STATE_SIZE   8
 
#define SHA384_OUTPUT_SIZE   48
 

Typedefs

typedef void * sha256_ctx_t
 
typedef void * sha224_ctx_t
 
typedef void * sha512_ctx_t
 
typedef void * sha384_ctx_t
 

Functions

sha256_ctx_t sha256_init (void)
 
int8_t sha256_update (sha256_ctx_t ctx, const uint8_t *data, size_t len)
 
uint8_tsha256_final (sha256_ctx_t ctx)
 
uint8_tsha256_hash (uint8_t *data, size_t length)
 
sha224_ctx_t sha224_init (void)
 
int8_t sha224_update (sha224_ctx_t ctx, const uint8_t *data, size_t len)
 
uint8_tsha224_final (sha224_ctx_t ctx)
 
uint8_tsha224_hash (uint8_t *data, size_t length)
 
sha512_ctx_t sha512_init (void)
 
int8_t sha512_update (sha512_ctx_t ctx, const uint8_t *data, size_t len)
 
uint8_tsha512_final (sha512_ctx_t ctx)
 
uint8_tsha512_hash (uint8_t *data, size_t length)
 
sha384_ctx_t sha384_init (void)
 
int8_t sha384_update (sha384_ctx_t ctx, const uint8_t *data, size_t len)
 
uint8_tsha384_final (sha384_ctx_t ctx)
 
uint8_tsha384_hash (uint8_t *data, size_t length)
 

Detailed Description

SHA-2 (Secure Hash Algorithm 2) family of cryptographic hash functions.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.