xref: /freebsd/contrib/wpa/src/crypto/sha256_i.h (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1 /*
2  * SHA-256 internal definitions
3  * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef SHA256_I_H
10 #define SHA256_I_H
11 
12 #define SHA256_BLOCK_SIZE 64
13 
14 struct sha256_state {
15 	u64 length;
16 	u32 state[8], curlen;
17 	u8 buf[SHA256_BLOCK_SIZE];
18 };
19 
20 void sha256_init(struct sha256_state *md);
21 int sha256_process(struct sha256_state *md, const unsigned char *in,
22 		   unsigned long inlen);
23 int sha256_done(struct sha256_state *md, unsigned char *out);
24 
25 #endif /* SHA256_I_H */
26