SHA2ext Class Reference

This class represents the implementation of the SHA384 and SHA512 algorithm. More...

#include <hl_sha2ext.h>

List of all members.

Public Member Functions

void SHA384_Init (HL_SHA_384_CTX *context)
 Initialize the SHA384 context.
void SHA512_Init (HL_SHA512_CTX *context)
 Initialize the SHA512 context.
void SHA384_Update (HL_SHA_384_CTX *context, const hl_uint8 *data, unsigned int len)
 Updates the SHA512 context.
void SHA512_Update (HL_SHA512_CTX *context, const hl_uint8 *data, unsigned int len)
 Updates the SHA284 context.
char * SHA384_End (HL_SHA_384_CTX *context, char buffer[SHA384_DIGEST_STRING_LENGTH])
 Ends the SHA384 operation and return the created hash in the given buffer.
char * SHA512_End (HL_SHA512_CTX *context, char buffer[SHA512_DIGEST_STRING_LENGTH])
 Ends the SHA512 operation and return the created hash in the given buffer.

Private Member Functions

void SHA384_Final (hl_uint8 digest[SHA384_DIGEST_LENGTH], HL_SHA_384_CTX *context)
 Finalize the sha384 operation.
void SHA512_Final (hl_uint8 digest[SHA512_DIGEST_LENGTH], HL_SHA512_CTX *context)
 Finalize the sha512 operation.
void SHA512_Last (HL_SHA512_CTX *context)
 Internal method.
void SHA512_Transform (HL_SHA512_CTX *context, const sha2_word64 *data)
 Internal data transformation.

Detailed Description

This class represents the implementation of the SHA384 and SHA512 algorithm.

Basically the class provides six public member-functions to create a hash: SHA384_Init(), SHA384_Update(), SHA384_End(), SHA512_Init(), SHA512_Update() and SHA512_End(). If you want to create a hash based on a string or file quickly you should use the sha384wrapper or sha512wrapper classes.


Member Function Documentation

char* SHA2ext::SHA384_End ( HL_SHA_384_CTX context,
char  buffer[SHA384_DIGEST_STRING_LENGTH] 
)

Ends the SHA384 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 SHA2ext::SHA384_Final ( hl_uint8  digest[SHA384_DIGEST_LENGTH],
HL_SHA_384_CTX context 
) [private]

Finalize the sha384 operation.

Parameters:
digest The digest to finalize the operation with.
context The context to finalize.
void SHA2ext::SHA384_Init ( HL_SHA_384_CTX context  ) 

Initialize the SHA384 context.

Parameters:
context The context to init.
void SHA2ext::SHA384_Update ( HL_SHA_384_CTX context,
const hl_uint8 data,
unsigned int  len 
)

Updates the SHA512 context.

Parameters:
context The context to update.
data The data for updating the context.
len The length of the given data.
char* SHA2ext::SHA512_End ( HL_SHA512_CTX context,
char  buffer[SHA512_DIGEST_STRING_LENGTH] 
)

Ends the SHA512 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 SHA2ext::SHA512_Final ( hl_uint8  digest[SHA512_DIGEST_LENGTH],
HL_SHA512_CTX context 
) [private]

Finalize the sha512 operation.

Parameters:
digest The digest to finalize the operation with.
context The context to finalize.
void SHA2ext::SHA512_Init ( HL_SHA512_CTX context  ) 

Initialize the SHA512 context.

Parameters:
context The context to init.
void SHA2ext::SHA512_Last ( HL_SHA512_CTX context  )  [private]

Internal method.

used by SHA512 and SHA384

Author:
Benjamin Gr�delbach
Parameters:
context The context of the operation
void SHA2ext::SHA512_Transform ( HL_SHA512_CTX context,
const sha2_word64 data 
) [private]

Internal data transformation.

Parameters:
context The context to use
data The data to transform
void SHA2ext::SHA512_Update ( HL_SHA512_CTX context,
const hl_uint8 data,
unsigned int  len 
)

Updates the SHA284 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