cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Classes | Macros | Typedefs | Functions
sha2.h File Reference
#include <stdlib.h>
#include "crypt.h"
#include "crypt/brg_types.h"

Go to the source code of this file.

Classes

struct  sha256_ctx
 
struct  sha2_ctx
 

Macros

#define SHA_2   /* for dynamic hash length */
 
#define SHA_224
 
#define SHA_256
 
#define SHA224_DIGEST_SIZE   28
 
#define SHA224_BLOCK_SIZE   64
 
#define SHA256_DIGEST_SIZE   32
 
#define SHA256_BLOCK_SIZE   64
 
#define sha224_hash   sha256_hash
 
#define SHA2_MAX_DIGEST_SIZE   SHA256_DIGEST_SIZE
 

Typedefs

typedef sha256_ctx sha224_ctx
 

Functions

VOID_RETURN sha256_compile (sha256_ctx ctx[1])
 
VOID_RETURN sha224_begin (sha224_ctx ctx[1])
 
VOID_RETURN sha224_end (unsigned char hval[], sha224_ctx ctx[1])
 
VOID_RETURN sha224 (unsigned char hval[], const unsigned char data[], unsigned long len)
 
VOID_RETURN sha256_begin (sha256_ctx ctx[1])
 
VOID_RETURN sha256_hash (const unsigned char data[], unsigned long len, sha256_ctx ctx[1])
 
VOID_RETURN sha256_end (unsigned char hval[], sha256_ctx ctx[1])
 
VOID_RETURN sha256 (unsigned char hval[], const unsigned char data[], unsigned long len)
 

Macro Definition Documentation

#define SHA224_BLOCK_SIZE   64

Definition at line 72 of file sha2.h.

#define SHA224_DIGEST_SIZE   28

Definition at line 71 of file sha2.h.

#define sha224_hash   sha256_hash

Definition at line 89 of file sha2.h.

#define SHA256_BLOCK_SIZE   64

Definition at line 74 of file sha2.h.

#define SHA256_DIGEST_SIZE   32

Definition at line 73 of file sha2.h.

#define SHA2_MAX_DIGEST_SIZE   SHA256_DIGEST_SIZE

Definition at line 107 of file sha2.h.

#define SHA_2   /* for dynamic hash length */

Definition at line 44 of file sha2.h.

#define SHA_224

Definition at line 45 of file sha2.h.

#define SHA_256

Definition at line 46 of file sha2.h.

Typedef Documentation

Definition at line 84 of file sha2.h.

Function Documentation

VOID_RETURN sha224 ( unsigned char  hval[],
const unsigned char  data[],
unsigned long  len 
)
VOID_RETURN sha224_begin ( sha224_ctx  ctx[1])
VOID_RETURN sha224_end ( unsigned char  hval[],
sha224_ctx  ctx[1] 
)
VOID_RETURN sha256 ( unsigned char  hval[],
const unsigned char  data[],
unsigned long  len 
)
VOID_RETURN sha256_begin ( sha256_ctx  ctx[1])
VOID_RETURN sha256_compile ( sha256_ctx  ctx[1])
VOID_RETURN sha256_end ( unsigned char  hval[],
sha256_ctx  ctx[1] 
)
VOID_RETURN sha256_hash ( const unsigned char  data[],
unsigned long  len,
sha256_ctx  ctx[1] 
)