aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/sha.h
blob: e8152b1bd58c1b19f087f08817cd7452556e758e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef __SHA_H__
#define __SHA_H__

#include <gmodule.h>

G_MODULE_EXPORT int strprintsha(char *dest, int *hashval);
 
typedef struct {
  guint32 H[5];
  guint32 W[80];
  int lenW;
  guint32 sizeHi,sizeLo;
} SHA_CTX;
 
G_MODULE_EXPORT void shaInit(SHA_CTX *ctx);
G_MODULE_EXPORT void shaUpdate(SHA_CTX *ctx, unsigned char *dataIn, int len);
G_MODULE_EXPORT void shaFinal(SHA_CTX *ctx, unsigned char hashout[20]);
G_MODULE_EXPORT void shaBlock(unsigned char *dataIn, int len, unsigned char hashout[20]);
G_MODULE_EXPORT char *shahash(char *str);

#endif