1#ifndef CSUM_FILE_H2#define CSUM_FILE_H34/* A SHA1-protected file */5struct sha1file {6int fd, error;7unsigned long offset;8SHA_CTX ctx;9unsigned char buffer[8192];10};1112extern struct sha1file *sha1create(const char *fmt, ...);13extern int sha1close(struct sha1file *);14extern int sha1write(struct sha1file *, void *, unsigned int);15extern int sha1write_compressed(struct sha1file *, void *, unsigned int);1617#endif