Added spec:commit task to commit changes to spec/ruby sources.
[rbx.git] / shotgun / lib / sha1.h
blobc37b9fc85e56be62e84200c5dd6f9b00ed20269f
1 #ifndef RBS_SHA1_H
2 #define RBS_SHA1_H
4 #include <sys/types.h>
5 #include <stdint.h>
6 #include <bstrlib.h>
8 typedef struct {
9 uint32_t state[5];
10 uint32_t count[2];
11 unsigned char buffer[64];
12 } SHA1_CTX;
14 void SHA1Transform(uint32_t state[5], unsigned char buffer[64]);
15 void SHA1Init(SHA1_CTX* context);
16 void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len);
17 void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
19 void sha1_hash_bstring(bstring input, unsigned char *digest);
20 void sha1_hash_string(unsigned char *input, int len, unsigned char *digest);
22 #endif