#ifndef __hash_h1#define __hash_h2/*3#include "crypto_uint8.h"4#include "crypto_uint32.h"5#include "crypto_uint64.h"6#include "crypto_hash.h"78typedef crypto_uint8 uint8_t;9typedef crypto_uint32 uint32_t;10typedef crypto_uint64 uint64_t;11*/12#include <stdint.h>1314#include "hash.h"1516/* some sizes (number of bytes) */17#define ROWS 818#define LENGTHFIELDLEN ROWS19#define COLS512 82021#define SIZE512 (ROWS*COLS512)2223#define ROUNDS512 1024#define HASH_BIT_LEN 2562526#define ROTL32(v, n) ((((v)<<(n))|((v)>>(32-(n))))&li_32(ffffffff))272829#define li_32(h) 0x##h##u30#define EXT_BYTE(var,n) ((uint8_t)((uint32_t)(var) >> (8*n)))31#define u32BIG(a) \32((ROTL32(a,8) & li_32(00FF00FF)) | \33(ROTL32(a,24) & li_32(FF00FF00)))343536/* NIST API begin */37typedef struct {38uint32_t chaining[SIZE512/sizeof(uint32_t)]; /* actual state */39uint32_t block_counter1,40block_counter2; /* message block counter(s) */41BitSequence buffer[SIZE512]; /* data buffer */42int buf_ptr; /* data buffer pointer */43int bits_in_last_byte; /* no. of message bits in last byte of44data buffer */45} groestlHashState;4647/*void Init(hashState*);48void Update(hashState*, const BitSequence*, DataLength);49void Final(hashState*, BitSequence*); */50void groestl(const BitSequence*, DataLength, BitSequence*);51/* NIST API end */5253/*54int crypto_hash(unsigned char *out,55const unsigned char *in,56unsigned long long len);57*/5859#endif /* __hash_h */606162