Back to index

php5  5.3.10
php_hash_ripemd.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_ripemd.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef PHP_HASH_RIPEMD_H
00022 #define PHP_HASH_RIPEMD_H
00023 #include "ext/standard/basic_functions.h"
00024 
00025 /* RIPEMD context. */
00026 typedef struct {
00027        php_hash_uint32 state[4];          /* state (ABCD) */
00028        php_hash_uint32 count[2];          /* number of bits, modulo 2^64 (lsb first) */
00029        unsigned char buffer[64];   /* input buffer */
00030 } PHP_RIPEMD128_CTX;
00031 
00032 typedef struct {
00033        php_hash_uint32 state[5];          /* state (ABCD) */
00034        php_hash_uint32 count[2];          /* number of bits, modulo 2^64 (lsb first) */
00035        unsigned char buffer[64];   /* input buffer */
00036 } PHP_RIPEMD160_CTX;
00037 
00038 typedef struct {
00039        php_hash_uint32 state[8];          /* state (ABCD) */
00040        php_hash_uint32 count[2];          /* number of bits, modulo 2^64 (lsb first) */
00041        unsigned char buffer[64];   /* input buffer */
00042 } PHP_RIPEMD256_CTX;
00043 
00044 typedef struct {
00045        php_hash_uint32 state[10];         /* state (ABCD) */
00046        php_hash_uint32 count[2];          /* number of bits, modulo 2^64 (lsb first) */
00047        unsigned char buffer[64];   /* input buffer */
00048 } PHP_RIPEMD320_CTX;
00049 
00050 PHP_HASH_API void PHP_RIPEMD128Init(PHP_RIPEMD128_CTX *);
00051 PHP_HASH_API void PHP_RIPEMD128Update(PHP_RIPEMD128_CTX *, const unsigned char *, unsigned int);
00052 PHP_HASH_API void PHP_RIPEMD128Final(unsigned char[16], PHP_RIPEMD128_CTX *);
00053 
00054 PHP_HASH_API void PHP_RIPEMD160Init(PHP_RIPEMD160_CTX *);
00055 PHP_HASH_API void PHP_RIPEMD160Update(PHP_RIPEMD160_CTX *, const unsigned char *, unsigned int);
00056 PHP_HASH_API void PHP_RIPEMD160Final(unsigned char[20], PHP_RIPEMD160_CTX *);
00057 
00058 PHP_HASH_API void PHP_RIPEMD256Init(PHP_RIPEMD256_CTX *);
00059 PHP_HASH_API void PHP_RIPEMD256Update(PHP_RIPEMD256_CTX *, const unsigned char *, unsigned int);
00060 PHP_HASH_API void PHP_RIPEMD256Final(unsigned char[32], PHP_RIPEMD256_CTX *);
00061 
00062 PHP_HASH_API void PHP_RIPEMD320Init(PHP_RIPEMD320_CTX *);
00063 PHP_HASH_API void PHP_RIPEMD320Update(PHP_RIPEMD320_CTX *, const unsigned char *, unsigned int);
00064 PHP_HASH_API void PHP_RIPEMD320Final(unsigned char[40], PHP_RIPEMD320_CTX *);
00065 
00066 #endif /* PHP_HASH_RIPEMD_H */