Sha256: baa9f6e12acb0c1f02a1a8b532cf33da29ec519eae6c6216062541044e948b6b

Contents?: true

Size: 1.59 KB

Versions: 19

Compression:

Stored size: 1.59 KB

Contents

/**********************************************************************
 *                          gosthash.h                                *
 *             Copyright (c) 2005-2006 Cryptocom LTD                  *
 *       This file is distributed under the same license as OpenSSL   *
 *                                                                    *
 *    Declaration of GOST R 34.11-94 hash functions                   *
 *       uses  and gost89.h Doesn't need OpenSSL                      *
 **********************************************************************/
#ifndef GOSTHASH_H
#define GOSTHASH_H
#include "gost89.h"
#include <stdlib.h>

#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
typedef __int64 ghosthash_len;
#elif defined(__arch64__)
typedef long ghosthash_len;
#else
typedef long long ghosthash_len;
#endif

typedef struct gost_hash_ctx {
		ghosthash_len len;
		gost_ctx *cipher_ctx;
		int left;
		byte H[32];
		byte S[32];
		byte remainder[32];
} gost_hash_ctx;		


/* Initalizes gost hash ctx, including creation of gost cipher ctx */

int init_gost_hash_ctx(gost_hash_ctx *ctx, const gost_subst_block *subst_block);
void done_gost_hash_ctx(gost_hash_ctx *ctx);

/* Cleans up all fields, except cipher ctx preparing ctx for computing
 * of new hash value */
int start_hash(gost_hash_ctx *ctx);

/* Hashes block of data */
int hash_block(gost_hash_ctx *ctx, const byte *block, size_t length);

/* Finalizes computation of hash  and fills buffer (which should be at
 * least 32 bytes long) with value of computed hash. */
int finish_hash(gost_hash_ctx *ctx, byte *hashval);

#endif	

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
rhodes-6.0.11 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
rhodes-5.5.18 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
rhodes-5.5.17 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
rhodes-5.5.15 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
rhodes-5.5.0.22 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
rhodes-5.5.2 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
rhodes-5.5.0.7 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
rhodes-5.5.0.3 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
rhodes-5.5.0 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
tauplatform-1.0.3 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
tauplatform-1.0.2 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
tauplatform-1.0.1 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
xmldsign-0.2.0.beta ext/xmldsign/gosthash.h
xmldsign-0.1.6 ext/xmldsign/gosthash.h
rhodes-3.5.1.12 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h
xmldsign-0.1.5 ext/xmldsign/gosthash.h
xmldsign-0.1.1 ext/xmldsign/gosthash.h
xmldsign-0.1.0 ext/xmldsign/gosthash.h
rhodes-3.4.2 lib/extensions/openssl.so/ext/sources/engines/ccgost/gosthash.h