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