diff options
author | Werner Koch <wk@gnupg.org> | 1998-01-12 10:18:17 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-01-12 10:18:17 +0000 |
commit | 5be1520a76c62616c5bb5ad5b5e0ca3a3131e3aa (patch) | |
tree | 8fceb4be0b6ebd3cdf289f8068e75f9d9dd03d9b /cipher/rmd.h | |
parent | a8122e0efccf2cd17bca14ba9ee347a8e244f73b (diff) | |
download | libgcrypt-5be1520a76c62616c5bb5ad5b5e0ca3a3131e3aa.tar.gz |
started with trust stuff
Diffstat (limited to 'cipher/rmd.h')
-rw-r--r-- | cipher/rmd.h | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/cipher/rmd.h b/cipher/rmd.h index 3d260cdc..8f53634d 100644 --- a/cipher/rmd.h +++ b/cipher/rmd.h @@ -25,27 +25,14 @@ typedef struct { u32 h0,h1,h2,h3,h4; u32 nblocks; - byte buffer[64]; - int bufcount; -} *RMDHANDLE; + byte buf[64]; + int count; +} RMD160_CONTEXT; -/**************** - * Process a single character, this character will be buffered to - * increase performance. - */ -#define rmd160_putchar(h,c) \ - do { \ - if( (h)->bufcount == 64 ) \ - rmd160_write( (h), NULL, 0 ); \ - (h)->buffer[(h)->bufcount++] = (c) & 0xff; \ - } while(0) - -RMDHANDLE rmd160_open( int secure ); -RMDHANDLE rmd160_copy( RMDHANDLE a ); -void rmd160_close(RMDHANDLE hd); -void rmd160_write( RMDHANDLE hd, byte *inbuf, size_t inlen); -byte * rmd160_final(RMDHANDLE hd); - +void rmd160_init( RMD160_CONTEXT *c ); +void rmd160_write( RMD160_CONTEXT *hd, byte *inbuf, size_t inlen); +void rmd160_final(RMD160_CONTEXT *hd); +#define rmd160_read(h) ( (h)->buf ) #endif /*G10_RMD_H*/ |