cctools
|
Routines for computing SHA1 checksums. More...
#include "int_sizes.h"
Go to the source code of this file.
Data Structures | |
struct | sha1_context_t |
Functions | |
void | sha1_buffer (const char *buffer, int length, unsigned char digest[SHA1_DIGEST_LENGTH]) |
Checksum a memory buffer. | |
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. |
Routines for computing SHA1 checksums.
void sha1_buffer | ( | const char * | buffer, |
int | length, | ||
unsigned char | digest[SHA1_DIGEST_LENGTH] | ||
) |
Checksum a memory buffer.
Note that this function produces a digest in binary form which must be converted to a human readable form with sha1_string.
buffer | Pointer to a memory buffer. |
length | Length of the buffer in bytes. |
digest | Pointer to a buffer to store the digest. |
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.
filename | Path to the file to checksum. |
digest | Pointer to a buffer to store the digest. |
const char* sha1_string | ( | unsigned char | digest[SHA1_DIGEST_LENGTH] | ) |
Convert an SHA1 digest into a printable string.
digest | A binary digest returned from sha1_file. |