diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-16 22:07:28 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-16 22:07:28 +0000 |
commit | 5348fd7d4afcc2ff5e3dba1bddc9fa50a3fb6ddd (patch) | |
tree | d41d9d8aa771f88e03aa78f63ebad3bf591bf9c1 /ext/sha1/sha1.h | |
parent | 4202ff1a9fba06137f58c0c757ada7e5c11b3ac5 (diff) | |
download | ruby-5348fd7d4afcc2ff5e3dba1bddc9fa50a3fb6ddd.tar.gz |
Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/sha1/sha1.h')
-rw-r--r-- | ext/sha1/sha1.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/sha1/sha1.h b/ext/sha1/sha1.h new file mode 100644 index 0000000000..f988476a1b --- /dev/null +++ b/ext/sha1/sha1.h @@ -0,0 +1,33 @@ +#ifndef _SHA1_H +#define _SHA1_H + +#include "config.h" + +#ifdef HAVE_PROTOTYPES +#define PROTOTYPES 1 +#endif +#ifndef PROTOTYPES +#define PROTOTYPES 0 +#endif + +#if PROTOTYPES +#define __P(x) x +#else +#define __P(x) () +#endif + +#include <stdio.h> +#include <string.h> + +typedef struct { + unsigned long state[5]; + unsigned long count[2]; + unsigned char buffer[64]; +} SHA1_CTX; + +void SHA1Transform __P((unsigned long state[5], unsigned char buffer[64])); +void SHA1Init __P((SHA1_CTX* context)); +void SHA1Update __P((SHA1_CTX* context, unsigned char* data, unsigned int len)); +void SHA1Final __P((unsigned char digest[20], SHA1_CTX* context)); + +#endif /* _SHA1_H */ |