Back to index

php5  5.3.10
php_hash_salsa.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: Michael Wallner <mike@php.net>                               |
00016    +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: php_hash_salsa.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef PHP_HASH_SALSA_H
00022 #define PHP_HASH_SALSA_H
00023 
00024 #include "ext/standard/basic_functions.h"
00025 
00026 /* SALSA context */
00027 typedef struct {
00028        php_hash_uint32 state[16];
00029        unsigned char init:1;
00030        unsigned char length:7;
00031        unsigned char buffer[64];
00032        void (*Transform)(php_hash_uint32 state[16], php_hash_uint32 data[16]);
00033 } PHP_SALSA_CTX;
00034 
00035 #define PHP_SALSAInit PHP_SALSA20Init
00036 PHP_HASH_API void PHP_SALSA10Init(PHP_SALSA_CTX *);
00037 PHP_HASH_API void PHP_SALSA20Init(PHP_SALSA_CTX *);
00038 
00039 PHP_HASH_API void PHP_SALSAUpdate(PHP_SALSA_CTX *, const unsigned char *, size_t);
00040 PHP_HASH_API void PHP_SALSAFinal(unsigned char[64], PHP_SALSA_CTX *);
00041 
00042 #endif
00043 
00044 /*
00045  * Local variables:
00046  * tab-width: 4
00047  * c-basic-offset: 4
00048  * End:
00049  * vim600: sw=4 ts=4 fdm=marker
00050  * vim<600: sw=4 ts=4
00051  */