2011-11-27 14:00:59 -05:00
|
|
|
/*
|
|
|
|
* SHA-256 internal definitions
|
|
|
|
* Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
|
|
|
|
*
|
2012-02-11 09:46:35 -05:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2011-11-27 14:00:59 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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 */
|