1 /**********************************************************************
3 * Copyright (c) 2005-2006 Cryptocom LTD *
4 * This file is distributed under the same license as OpenSSL *
6 * Declaration of GOST R 34.11-94 hash functions *
7 * uses and gost89.h Doesn't need OpenSSL *
8 **********************************************************************/
13 typedef struct gost_hash_ctx {
23 /* Initalizes gost hash ctx, including creation of gost cipher ctx */
25 int init_gost_hash_ctx(gost_hash_ctx *ctx, const gost_subst_block *subst_block);
26 void done_gost_hash_ctx(gost_hash_ctx *ctx);
28 /* Cleans up all fields, except cipher ctx preparing ctx for computing
29 * of new hash value */
30 int start_hash(gost_hash_ctx *ctx);
32 /* Hashes block of data */
33 int hash_block(gost_hash_ctx *ctx, const byte *block, size_t length);
35 /* Finalizes computation of hash and fills buffer (which should be at
36 * least 32 bytes long) with value of computed hash. */
37 int finish_hash(gost_hash_ctx *ctx, byte *hashval);