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

sha1.h File Reference


Detailed Description

Routines for computing SHA1 checksums.

#include "int_sizes.h"

Go to the source code of this file.

Data Structures

struct  sha1_context_t

Functions

int sha1_file (const char *filename, unsigned char digest[SHA1_DIGEST_LENGTH])
 Checksum a local file.
const char * sha1_string (unsigned char digest[SHA1_DIGEST_LENGTH])
 Convert an SHA1 digest into a printable string.


Function Documentation

int sha1_file const char *  filename,
unsigned char  digest[SHA1_DIGEST_LENGTH]
 

Checksum a local file.

Note that this function produces a digest in binary form which must be converted to a human readable form with sha1_string.

Parameters:
filename Path to the file to checksum.
digest Pointer to a buffer to store the digest.
Returns:
One on success, zero on failure.

const char* sha1_string unsigned char  digest[SHA1_DIGEST_LENGTH]  ) 
 

Convert an SHA1 digest into a printable string.

Parameters:
digest A binary digest returned from sha1_file.
Returns:
A static pointer to a human readable form of the digest.


Generated on Mon Mar 29 16:26:25 2010 for cctools by  doxygen 1.3.9.1