Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 1 | /* |
| 2 | * SHA-256 internal definitions |
| 3 | * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi> |
| 4 | * |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 5 | * This software may be distributed under the terms of the BSD license. |
| 6 | * See README for more details. |
Dmitry Shmidt | 1f69aa5 | 2012-01-24 16:10:04 -0800 | [diff] [blame] | 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 */ |