/*1* FIPS-180-2 compliant SHA-256 implementation2*3* Copyright (C) 2001-2003 Christophe Devine4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*/192021// Lightly modified by hrydgard (inttypes.h, const input)2223#ifndef _SHA256_H24#define _SHA256_H2526#include <inttypes.h>2728struct sha256_context {29uint32_t total[2];30uint32_t state[8];31uint8_t buffer[64];32};3334void sha256_starts(sha256_context *ctx);35void sha256_update(sha256_context *ctx, const uint8_t *input, uint32_t length);36void sha256_finish(sha256_context *ctx, uint8_t digest[32]);3738#endif /* sha256.h */394041