projects
/
onak.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
cscvs to tla changeset 14
[onak.git]
/
sha.h
1
#ifndef __SHA_H__
2
#define __SHA_H__
3
4
#include <stdio.h>
5
#include <stdlib.h>
6
#include <string.h>
7
#include <assert.h>
8
// #include <stdint.h>
9
#include <inttypes.h>
10
11
#include "bithelp.h"
12
13
typedef struct {
14
uint32_t h0,h1,h2,h3,h4;
15
uint32_t nblocks;
16
uint8_t buf[64];
17
int count;
18
} SHA1_CONTEXT;
19
20
void sha1_init(SHA1_CONTEXT *);
21
void sha1_write(SHA1_CONTEXT *, uint8_t *, size_t);
22
void sha1_final(SHA1_CONTEXT *);
23
unsigned char *sha1_read(SHA1_CONTEXT *);
24
25
#endif /* __SHA_H__ */