aboutsummaryrefslogtreecommitdiff
path: root/openssl/engines/ccgost/gosthash.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-02-22 14:43:31 +0100
committermarha <marha@users.sourceforge.net>2015-02-22 14:43:31 +0100
commitc9aad1ae6227c434d480d1d3aa8eae3c3c910c18 (patch)
tree94b917df998c3d547e191b3b9c58bbffc616470e /openssl/engines/ccgost/gosthash.h
parentf1c2db43dcf35d2cf4715390bd2391c28e42a8c2 (diff)
downloadvcxsrv-c9aad1ae6227c434d480d1d3aa8eae3c3c910c18.tar.gz
vcxsrv-c9aad1ae6227c434d480d1d3aa8eae3c3c910c18.tar.bz2
vcxsrv-c9aad1ae6227c434d480d1d3aa8eae3c3c910c18.zip
Upgraded to openssl-1.0.2
Diffstat (limited to 'openssl/engines/ccgost/gosthash.h')
-rw-r--r--openssl/engines/ccgost/gosthash.h54
1 files changed, 29 insertions, 25 deletions
diff --git a/openssl/engines/ccgost/gosthash.h b/openssl/engines/ccgost/gosthash.h
index 4a2e441ec..003e668e0 100644
--- a/openssl/engines/ccgost/gosthash.h
+++ b/openssl/engines/ccgost/gosthash.h
@@ -7,42 +7,46 @@
* uses and gost89.h Doesn't need OpenSSL *
**********************************************************************/
#ifndef GOSTHASH_H
-#define GOSTHASH_H
-#include "gost89.h"
-#include <stdlib.h>
+# define GOSTHASH_H
+# include "gost89.h"
+# include <stdlib.h>
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
+# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
typedef __int64 ghosthash_len;
-#elif defined(__arch64__)
+# elif defined(__arch64__)
typedef long ghosthash_len;
-#else
+# else
typedef long long ghosthash_len;
-#endif
+# 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;
-
+ 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);
+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);
+/*
+ * 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);
+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);
+/*
+ * 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
+#endif