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