/* * Compines function to put the hash value of the supplied BUFFER into * OUTBUF which must have a size of 20 bytes. */ void rmd160_hash_buffer (void *outbuf, const void *buffer, size_t length) { rmd160_context_t hd; rmd160_init (&hd); rmd160_write (&hd, buffer, length); rmd160_final (&hd); memcpy (outbuf, hd.buf, 20); }
/**************** * Shortcut functions which puts the hash value of the supplied buffer * into outbuf which must have a size of 20 bytes. */ void _gcry_rmd160_hash_buffer (void *outbuf, const void *buffer, size_t length ) { RMD160_CONTEXT hd; _gcry_rmd160_init ( &hd ); _gcry_md_block_write ( &hd, buffer, length ); rmd160_final ( &hd ); memcpy ( outbuf, hd.bctx.buf, 20 ); }
/**************** * Shortcut functions which puts the hash value of the supplied buffer * into outbuf which must have a size of 20 bytes. */ void _gcry_rmd160_hash_buffer( char *outbuf, const char *buffer, size_t length ) { RMD160_CONTEXT hd; _gcry_rmd160_init( &hd ); rmd160_write( &hd, (byte*)buffer, length ); rmd160_final( &hd ); memcpy( outbuf, hd.buf, 20 ); }