Back to index

php5  5.3.10
php_hash_haval.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: Sara Golemon <pollita@php.net>                               |
00016    +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: php_hash_haval.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef PHP_HASH_HAVAL_H
00022 #define PHP_HASH_HAVAL_H
00023 
00024 #include "ext/standard/basic_functions.h"
00025 /* HAVAL context. */
00026 typedef struct {
00027        php_hash_uint32 state[8];
00028        php_hash_uint32 count[2];
00029        unsigned char buffer[128];
00030 
00031        char passes;
00032        short output;
00033        void (*Transform)(php_hash_uint32 state[8], const unsigned char block[128]);
00034 } PHP_HAVAL_CTX;
00035 
00036 #define PHP_HASH_HAVAL_INIT_DECL(p,b)     PHP_HASH_API void PHP_##p##HAVAL##b##Init(PHP_HAVAL_CTX *); \
00037                                                                       PHP_HASH_API void PHP_HAVAL##b##Final(unsigned char*, PHP_HAVAL_CTX *);
00038 
00039 PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *, const unsigned char *, unsigned int);
00040 
00041 PHP_HASH_HAVAL_INIT_DECL(3,128)
00042 PHP_HASH_HAVAL_INIT_DECL(3,160)
00043 PHP_HASH_HAVAL_INIT_DECL(3,192)
00044 PHP_HASH_HAVAL_INIT_DECL(3,224)
00045 PHP_HASH_HAVAL_INIT_DECL(3,256)
00046 
00047 PHP_HASH_HAVAL_INIT_DECL(4,128)
00048 PHP_HASH_HAVAL_INIT_DECL(4,160)
00049 PHP_HASH_HAVAL_INIT_DECL(4,192)
00050 PHP_HASH_HAVAL_INIT_DECL(4,224)
00051 PHP_HASH_HAVAL_INIT_DECL(4,256)
00052 
00053 PHP_HASH_HAVAL_INIT_DECL(5,128)
00054 PHP_HASH_HAVAL_INIT_DECL(5,160)
00055 PHP_HASH_HAVAL_INIT_DECL(5,192)
00056 PHP_HASH_HAVAL_INIT_DECL(5,224)
00057 PHP_HASH_HAVAL_INIT_DECL(5,256)
00058 
00059 #endif