+#define SHA1_FMT \
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x" \
+ "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
+#define SHA1_ARGS(DIGEST) \
+ ((DIGEST)[0]), ((DIGEST)[1]), ((DIGEST)[2]), ((DIGEST)[3]), \
+ ((DIGEST)[4]), ((DIGEST)[5]), ((DIGEST)[6]), ((DIGEST)[7]), \
+ ((DIGEST)[8]), ((DIGEST)[9]), ((DIGEST)[10]), ((DIGEST)[11]), \
+ ((DIGEST)[12]), ((DIGEST)[13]), ((DIGEST)[14]), ((DIGEST)[15]), \
+ ((DIGEST)[16]), ((DIGEST)[17]), ((DIGEST)[18]), ((DIGEST)[19])
+
+void sha1_to_hex(const uint8_t digest[SHA1_DIGEST_SIZE],
+ char hex[SHA1_HEX_DIGEST_LEN + 1]);
+bool sha1_from_hex(uint8_t digest[SHA1_DIGEST_SIZE], const char *hex);
+