#ifndef _SHA1_H_
#define _SHA1_H_


#ifdef __cplusplus
extern "C" {
#endif // __cplusplus


#define igor_SHA_DIGEST_LENGTH 20

typedef struct {
    unsigned long state[5];
    unsigned long count[2];
    unsigned char buffer[64];
} igor_SHA1_CTX;

void igor_SHA1Transform(unsigned long state[5], const unsigned char buffer[64]);
void igor_SHA1Init(igor_SHA1_CTX* context);
void igor_SHA1Update(igor_SHA1_CTX* context, const unsigned char* data, unsigned int len);
void igor_SHA1Final(unsigned char digest[igor_SHA_DIGEST_LENGTH], igor_SHA1_CTX* context);
void igor_SHA1(const unsigned char *data, unsigned int len, unsigned char md[igor_SHA_DIGEST_LENGTH]);

#ifdef __cplusplus
}
#endif // __cplusplus


#endif /* _SHA1_H_ */
