blob: 20ae4889fd3738568cf39d3afecca0c6498feb00 [file] [log] [blame]
Ericc3fa0072021-05-19 17:45:38 +02001/*
2 * SHA-256 internal definitions
3 * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
11 *
12 * See README and COPYING for more details.
13 */
14
15#ifndef SHA256_I_H
16#define SHA256_I_H
17
18#define SHA256_BLOCK_SIZE 64
19
20struct sha256_state {
21 u64 length;
22 u32 state[8], curlen;
23 u8 buf[SHA256_BLOCK_SIZE];
24};
25
26void sha256_init(struct sha256_state *md);
27int sha256_process(struct sha256_state *md, const unsigned char *in,
28 unsigned long inlen);
29int sha256_done(struct sha256_state *md, unsigned char *out);
30
31#endif /* SHA256_I_H */