summaryrefslogtreecommitdiff
path: root/cipher/sha1.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-01-12 10:18:17 +0000
committerWerner Koch <wk@gnupg.org>1998-01-12 10:18:17 +0000
commit5be1520a76c62616c5bb5ad5b5e0ca3a3131e3aa (patch)
tree8fceb4be0b6ebd3cdf289f8068e75f9d9dd03d9b /cipher/sha1.h
parenta8122e0efccf2cd17bca14ba9ee347a8e244f73b (diff)
downloadlibgcrypt-5be1520a76c62616c5bb5ad5b5e0ca3a3131e3aa.tar.gz
started with trust stuff
Diffstat (limited to 'cipher/sha1.h')
-rw-r--r--cipher/sha1.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/cipher/sha1.h b/cipher/sha1.h
index ca03936f..93af2cac 100644
--- a/cipher/sha1.h
+++ b/cipher/sha1.h
@@ -25,26 +25,14 @@
typedef struct {
u32 h0,h1,h2,h3,h4;
u32 nblocks;
- byte buffer[64];
- int bufcount;
-} *SHA1HANDLE;
+ byte buf[64];
+ int count;
+} SHA1_CONTEXT;
-/****************
- * Process a single character, this character will be buffered to
- * increase performance.
- */
-#define sha1_putchar(h,c) \
- do { \
- if( (h)->bufcount == 64 ) \
- sha1_write( (h), NULL, 0 ); \
- (h)->buffer[(h)->bufcount++] = (c) & 0xff; \
- } while(0)
-
-SHA1HANDLE sha1_open( int secure );
-SHA1HANDLE sha1_copy( SHA1HANDLE a );
-void sha1_close( SHA1HANDLE hd );
-void sha1_write( SHA1HANDLE hd, byte *inbuf, size_t inlen );
-byte * sha1_final( SHA1HANDLE hd );
+void sha1_init( SHA1_CONTEXT *c );
+void sha1_write( SHA1_CONTEXT *hd, byte *inbuf, size_t inlen);
+void sha1_final( SHA1_CONTEXT *hd);
+#define sha1_read(h) ( (h)->buf )
#endif /*G10_SHA1_H*/