blob: a502d2ba5d68ac26258bfbef98b4fa1fad9c2aa7 [file] [log] [blame]
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -08001/*
2 * SHA-256 internal definitions
3 * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
4 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -08007 */
8
9#ifndef SHA256_I_H
10#define SHA256_I_H
11
12#define SHA256_BLOCK_SIZE 64
13
14struct sha256_state {
15 u64 length;
16 u32 state[8], curlen;
17 u8 buf[SHA256_BLOCK_SIZE];
18};
19
20void sha256_init(struct sha256_state *md);
21int sha256_process(struct sha256_state *md, const unsigned char *in,
22 unsigned long inlen);
23int sha256_done(struct sha256_state *md, unsigned char *out);
24
25#endif /* SHA256_I_H */