SHA256 Class Reference

This class represents the implementation of the sha256 algorithm. More...

#include <hl_sha256.h>

List of all members.

Public Member Functions

void SHA256_Init (HL_SHA256_CTX *context)
 Initialize the context.
void SHA256_Update (HL_SHA256_CTX *context, const hl_uint8 *data, unsigned int len)
 Updates the context.
char * SHA256_End (HL_SHA256_CTX *context, char buffer[SHA256_DIGEST_STRING_LENGTH])
 Ends the sha256 operation and return the created hash in the given buffer.

Private Member Functions

void SHA256_Final (hl_uint8 digest[SHA256_DIGEST_LENGTH], HL_SHA256_CTX *context)
 Finalize the sha256 operation.
void SHA256_Transform (HL_SHA256_CTX *context, const sha2_word32 *data)
 Internal data transformation.

Detailed Description

This class represents the implementation of the sha256 algorithm.

Basically the class provides three public member-functions to create a hash: SHA256_Init(), SHA256_Update() and SHA256_End(). If you want to create a hash based on a string or file quickly you should use the sha256wrapper class instead of SHA256.


Member Function Documentation

char* SHA256::SHA256_End ( HL_SHA256_CTX context,
char  buffer[SHA256_DIGEST_STRING_LENGTH] 
)

Ends the sha256 operation and return the created hash in the given buffer.

Parameters:
context The context to end.
buffer This OUT-Parameter contains the created hash after ending the operation.
void SHA256::SHA256_Final ( hl_uint8  digest[SHA256_DIGEST_LENGTH],
HL_SHA256_CTX context 
) [private]

Finalize the sha256 operation.

Parameters:
digest The digest to finalize the operation with.
context The context to finalize.
void SHA256::SHA256_Init ( HL_SHA256_CTX context  ) 

Initialize the context.

Parameters:
context The context to init.
void SHA256::SHA256_Transform ( HL_SHA256_CTX context,
const sha2_word32 data 
) [private]

Internal data transformation.

Parameters:
context The context to use
data The data to transform
void SHA256::SHA256_Update ( HL_SHA256_CTX context,
const hl_uint8 data,
unsigned int  len 
)

Updates the context.

Parameters:
context The context to update.
data The data for updating the context.
len The length of the given data.

The documentation for this class was generated from the following files:
Generated on Thu Oct 13 20:06:35 2011 for hashlib++ by  doxygen 1.6.3