diff options
author | Werner Koch <wk@gnupg.org> | 1998-03-09 21:43:50 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-03-09 21:43:50 +0000 |
commit | b26d230c07a8e602e749adf8159ca9db3a509eaf (patch) | |
tree | 6d51347d0b8a02be57cd885c9e352b2b29df2594 /cipher/rmd160.c | |
parent | 2a815f4a05881f8c19e1ce98230694339380c22f (diff) | |
download | libgcrypt-b26d230c07a8e602e749adf8159ca9db3a509eaf.tar.gz |
partial DSA support
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 7b87d421..8d17b287 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 */ |