File: sha1.h

package info (click to toggle)
fio 1.38-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,108 kB
  • ctags: 2,240
  • sloc: ansic: 17,668; makefile: 98; sh: 55
file content (20 lines) | stat: -rw-r--r-- 483 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef FIO_SHA1
#define FIO_SHA1

/*
 * Based on the Mozilla SHA1 (see mozilla-sha1/sha1.h),
 * optimized to do word accesses rather than byte accesses,
 * and to avoid unnecessary copies into the context array.
 */

struct sha1_ctx {
	uint32_t *H;
	unsigned int W[16];
	unsigned long long size;
};

void sha1_init(struct sha1_ctx *);
void sha1_update(struct sha1_ctx *, const void *dataIn, unsigned long len);
void sha1_final(unsigned char hashout[20], struct sha1_ctx *);

#endif