Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

sha1.h File Reference

#include <glib.h>

Go to the source code of this file.

Data Structures

struct  SHA1Context
 This structure will hold context information for the SHA-1 hashing operation. More...


Defines

#define SHA1HashSize   20

Typedefs

typedef SHA1Context SHA1Context
 This structure will hold context information for the SHA-1 hashing operation.


Enumerations

enum  { shaSuccess = 0, shaNull, shaInputTooLong, shaStateError }

Functions

int SHA1Reset (SHA1Context *)
 SHA1Reset.

int SHA1Input (SHA1Context *, const guint8 *, unsigned int)
 SHA1Input.

int SHA1Result (SHA1Context *, guint8 Message_Digest[SHA1HashSize])
 SHA1Result.


Define Documentation

#define SHA1HashSize   20
 


Typedef Documentation

typedef struct SHA1Context SHA1Context
 

This structure will hold context information for the SHA-1 hashing operation.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
shaSuccess 
shaNull  Null pointer parameter.
shaInputTooLong  input data too long
shaStateError  called Input after Result


Function Documentation

int SHA1Input SHA1Context context,
const guint8 *  message_array,
unsigned  length
 

SHA1Input.

Description: This function accepts an array of octets as the next portion of the message.

Parameters: context: [in/out] The SHA context to update message_array: [in] An array of characters representing the next portion of the message. length: [in] The length of the message in message_array

Returns: sha Error Code.

int SHA1Reset SHA1Context context  ) 
 

SHA1Reset.

Description: This function will initialize the SHA1Context in preparation for computing a new SHA1 message digest.

Parameters: context: [in/out] The context to reset.

Returns: sha Error Code.

int SHA1Result SHA1Context context,
guint8  Message_Digest[SHA1HashSize]
 

SHA1Result.

Description: This function will return the 160-bit message digest into the Message_Digest array provided by the caller. NOTE: The first octet of hash is stored in the 0th element, the last octet of hash in the 19th element.

Parameters: context: [in/out] The context to use to calculate the SHA-1 hash. Message_Digest: [out] Where the digest is returned.

Returns: sha Error Code.


Generated on Sun Feb 12 10:50:08 2006 for Gtk-Gnutella by doxygen 1.3.6