mutt stable branch with some hacks
at master 32 lines 720 B view raw
1/* 2 SHA-1 in C 3 4 By Steve Reid <steve@edmweb.com>, with small changes to make it 5 fit into mutt by Thomas Roessler <roessler@does-not-exist.org>. 6 7*/ 8 9#ifndef _SHA1_H 10# define _SHA1_H 11 12#include "crypthash.h" 13 14typedef struct { 15 uint32_t state[5]; 16 uint32_t count[2]; 17 unsigned char buffer[64]; 18} SHA1_CTX; 19 20void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); 21void SHA1Init(SHA1_CTX* context); 22void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len); 23void SHA1Final(unsigned char digest[20], SHA1_CTX* context); 24 25# define SHA1_Transform SHA1Transform 26# define SHA1_Init SHA1Init 27# define SHA1_Update SHA1Update 28# define SHA1_Final SHA1Final 29 30# define SHA_DIGEST_LENGTH 20 31 32#endif