15e9e13erpaulo/*
25e9e13erpaulo * SHA-256 internal definitions
35e9e13erpaulo * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
45e9e13erpaulo *
55e9e13erpaulo * This software may be distributed under the terms of the BSD license.
65e9e13erpaulo * See README for more details.
75e9e13erpaulo */
85e9e13erpaulo
95e9e13erpaulo#ifndef SHA256_I_H
105e9e13erpaulo#define SHA256_I_H
115e9e13erpaulo
125e9e13erpaulo#define SHA256_BLOCK_SIZE 64
135e9e13erpaulo
145e9e13erpaulostruct sha256_state {
155e9e13erpaulo	u64 length;
165e9e13erpaulo	u32 state[8], curlen;
175e9e13erpaulo	u8 buf[SHA256_BLOCK_SIZE];
185e9e13erpaulo};
195e9e13erpaulo
205e9e13erpaulovoid sha256_init(struct sha256_state *md);
215e9e13erpauloint sha256_process(struct sha256_state *md, const unsigned char *in,
225e9e13erpaulo		   unsigned long inlen);
235e9e13erpauloint sha256_done(struct sha256_state *md, unsigned char *out);
245e9e13erpaulo
255e9e13erpaulo#endif /* SHA256_I_H */
26