Back to index

php5  5.3.10
sha1.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Stefan Esser <sesser@php.net>                                |
00016    +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: sha1.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef SHA1_H
00022 #define SHA1_H
00023 
00024 #include "ext/standard/basic_functions.h"
00025 
00026 /* SHA1 context. */
00027 typedef struct {
00028        php_uint32 state[5];        /* state (ABCD) */
00029        php_uint32 count[2];        /* number of bits, modulo 2^64 (lsb first) */
00030        unsigned char buffer[64];   /* input buffer */
00031 } PHP_SHA1_CTX;
00032 
00033 PHPAPI void PHP_SHA1Init(PHP_SHA1_CTX *);
00034 PHPAPI void PHP_SHA1Update(PHP_SHA1_CTX *, const unsigned char *, unsigned int);
00035 PHPAPI void PHP_SHA1Final(unsigned char[20], PHP_SHA1_CTX *);
00036 PHPAPI void make_sha1_digest(char *sha1str, unsigned char *digest);
00037 
00038 PHP_FUNCTION(sha1);
00039 PHP_FUNCTION(sha1_file);
00040 
00041 #endif