19 #define sha1_init dttools_sha1_init
20 #define sha1_update dttools_sha1_update
21 #define sha1_final dttools_sha1_final
22 #define sha1_buffer dttools_sha1_buffer
23 #define sha1_file dttools_sha1_file
24 #define sha1_string dttools_sha1_string
26 #define SHA1_DIGEST_LENGTH 20
27 #define SHA1_DIGEST_ASCII_LENGTH 42
31 size_t countLo, countHi;
38 void sha1_final(
unsigned char digest[SHA1_DIGEST_LENGTH],
sha1_context_t * ctx);
48 void sha1_buffer(
const void *
buffer,
size_t length,
unsigned char digest[SHA1_DIGEST_LENGTH]);
58 int sha1_file(
const char *path,
unsigned char digest[SHA1_DIGEST_LENGTH]);
60 int sha1_fd(
int fd,
unsigned char digest[SHA1_DIGEST_LENGTH]);
67 const char *
sha1_string(
unsigned char digest[SHA1_DIGEST_LENGTH]);
const char * sha1_string(unsigned char digest[SHA1_DIGEST_LENGTH])
Convert an SHA1 digest into a printable string.
void sha1_buffer(const void *buffer, size_t length, unsigned char digest[SHA1_DIGEST_LENGTH])
Checksum a memory buffer.
int sha1_file(const char *path, unsigned char digest[SHA1_DIGEST_LENGTH])
Checksum a local file.