diff options
Diffstat (limited to 'cipher/rmd160.c')
-rw-r--r-- | cipher/rmd160.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cipher/rmd160.c b/cipher/rmd160.c index 7b87d4218..8d17b287f 100644 --- a/cipher/rmd160.c +++ b/cipher/rmd160.c @@ -300,6 +300,27 @@ rmd160_write( RMD160_CONTEXT *hd, byte *inbuf, size_t inlen) } +/**************** + * Apply the rmd160 transform function on the buffer which must have + * a length 64 bytes. Do not use this function together with the + * other functions, use rmd160_init to initialize intzernal variables. + * Returns: 16 bytes in buffer with the mixed contentes of buffer. + */ +void +rmd160_mixblock( RMD160_CONTEXT *hd, char *buffer ) +{ + char *p = buffer; + transform( hd, buffer ); + #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0) + X(0); + X(1); + X(2); + X(3); + X(4); + #undef X +} + + /* The routine terminates the computation */ |