summaryrefslogtreecommitdiff
path: root/sha256.h
diff options
context:
space:
mode:
authorStefan Esser2010-02-21 11:44:54 +0100
committerStefan Esser2010-02-21 11:44:54 +0100
commit36dbfacbe64697d959f524e537b15b73c090d898 (patch)
treef1c7ce1409b0e7765fc72d550546967fcf0f9717 /sha256.h
Inital commit
Diffstat (limited to 'sha256.h')
-rw-r--r--sha256.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/sha256.h b/sha256.h
new file mode 100644
index 0000000..a078221
--- /dev/null
+++ b/sha256.h
@@ -0,0 +1,38 @@
1/*
2 +----------------------------------------------------------------------+
3 | Suhosin Version 1 |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2006-2007 The Hardened-PHP Project |
6 | Copyright (c) 2007 SektionEins GmbH |
7 +----------------------------------------------------------------------+
8 | This source file is subject to version 3.01 of the PHP license, |
9 | that is bundled with this package in the file LICENSE, and is |
10 | available through the world-wide-web at the following url: |
11 | http://www.php.net/license/3_01.txt |
12 | If you did not receive a copy of the PHP license and are unable to |
13 | obtain it through the world-wide-web, please send a note to |
14 | license@php.net so we can mail you a copy immediately. |
15 +----------------------------------------------------------------------+
16 | Author: Stefan Esser <sesser@sektioneins.de> |
17 +----------------------------------------------------------------------+
18*/
19
20/* $Id: sha256.h,v 1.1.1.1 2007-11-28 01:15:35 sesser Exp $ */
21
22#ifndef SHA256_H
23#define SHA256_H
24
25#include "ext/standard/basic_functions.h"
26
27/* SHA1 context. */
28typedef struct {
29 php_uint32 state[8]; /* state (ABCD) */
30 php_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */
31 unsigned char buffer[64]; /* input buffer */
32} suhosin_SHA256_CTX;
33
34void suhosin_SHA256Init(suhosin_SHA256_CTX *);
35void suhosin_SHA256Update(suhosin_SHA256_CTX *, const unsigned char *, unsigned int);
36void suhosin_SHA256Final(unsigned char[32], suhosin_SHA256_CTX *);
37
38#endif