Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Examples  

sha.c File Reference

Go to the source code of this file.

Defines

#define SHA_ROTL(X, n)   (((X) << (n)) | ((X) >> (32-(n))))

Functions

void shaHashBlock (SHA_CTX *ctx)
void shaInit (SHA_CTX *ctx)
void shaUpdate (SHA_CTX *ctx, unsigned char *dataIn, int len)
void shaFinal (SHA_CTX *ctx, unsigned char hashout[20])
void shaBlock (unsigned char *dataIn, int len, unsigned char hashout[20])
char * shahash (char *str)
void shahash_r (const char *str, char hashbuf[41])
 Calculate the SHA of a string.


Detailed Description

This file implements the Secure Hash Algorithm.

Definition in file sha.c.


Function Documentation

void shahash_r const char *    str,
char    hashbuf[41]
 

Calculate the SHA of a string.

Parameters:
str Pointer to a NULL terminated string of characters that you want to calculate the SHA.
hashbuf Pointer to a memory locattion that will receive the SHA calculated from 'str'. Please note that 'hashbuf' should be at least 41 bytes long (40 bytes for the SHA result and 1 byte for the final 0).
Examples:
test_sha.c.

Definition at line 200 of file sha.c.


Generated on Thu Apr 3 16:23:46 2003 for Common_C_libraries by doxygen1.3-rc1