]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - include/sha1.h
2 * No copyright is claimed. This code is in the public domain; do with
5 #ifndef UTIL_LINUX_SHA1_H
6 #define UTIL_LINUX_SHA1_H
10 By Steve Reid <steve@edmweb.com>
16 #define UL_SHA1LENGTH 20
22 unsigned char buffer
[64];
25 void ul_SHA1Transform(uint32_t state
[5], const unsigned char buffer
[64]);
26 void ul_SHA1Init(UL_SHA1_CTX
*context
);
27 void ul_SHA1Update(UL_SHA1_CTX
*context
, const unsigned char *data
, uint32_t len
);
28 void ul_SHA1Final(unsigned char digest
[UL_SHA1LENGTH
], UL_SHA1_CTX
*context
);
29 void ul_SHA1(char *hash_out
, const char *str
, unsigned len
);
31 #endif /* UTIL_LINUX_SHA1_H */