diff options
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 3d260cdca..8f53634d8 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*/ |