English | Magyar
JS ki | CSS ki | Ékezetek ki | HiContrast
Lapozó:  (0 - 1424) 
<== | ==>
Ugrás a végére | Összes megjelenítése | Utolsó oldal
OpenOpera patches | Opera-SSL patches | Opera 12.15 source (Git repository) | Opera 12.15 source (Torrent) | Opera internal pages | Otter Browser Linux x64 - Qt5.15.2/QtWebKit5.602.1 (2024.04.27. 20:05)
OS for MC680x0 | OS for PPC | OS for Sparc64 | besztofbégéaefcé | CSÉNDZSLOG | WebToolz | DDG Shit Filter | Google Shit Filter | Progz | Fast CSS Box | Browser | OS | Agent | Statisztika | BBCode
Monospace font-family: Courier New | Browser default monospace
Email értesítő / Email notification ===> 
Keresés
Σ: 1 post

TCH  (statz) Főfasz
#1, Főfasz (10443)
1716 | #3ef9 | ^ | Idézet | Mon, 22 Aug 2016 15:03:50 +02
188.143.*.* Linux x86 Opera Classic Hungary *.pool.digikabel.hu
Miért .bin a kiterjesztése? UNIX-os binárisoknak nincs kiterjesztése.
Írtam saját hash függvényt. Használjátok egész seggel:
#ifndef _FHASH192_C
#define _FHASH192_C 1

#include <stdint.h>
#include <stdlib.h>

int fhash192(char *data, size_t length, uint32_t **hash_out)
{
	size_t i;
	char c, p, nc, np;
	uint32_t j, mask, n, *hash;

	if (hash_out == NULL)
	{
		hash = calloc(6, sizeof(uint32_t));
		if (hash == NULL)
		{
			return 1;
		}
	}
	else
	{
		hash = *hash_out;
	}
	mask = 0xe1b527ad;
	p = 0;
	for (i = 0; i < length; ++i)
	{
		np = ~p;
		c = data[i];
		nc = ~c;

		n = c << 24 | c << 16 | c << 8 | c;
		mask ^= ~n;
		for (j = 0; j < 6; ++j)
		{
			hash[j] ^= mask;
			hash[j] ^= n;
			n = ~n;
			mask = ((mask << 1) | (mask >> 31)) - 1;
		}
		n = (c ^ p);
		n = n << 8 | n;
		n = n << 16 | n;
		n ^= mask;
		hash[0] ^= n;
		n = c << 24 | p << 16 | c << 8 | p;
		hash[1] ^= n;
		n = nc << 24 | np << 16 | nc << 8 | np;
		hash[2] ^= n;
		n = p << 24 | c << 16 | p << 8 | c;
		hash[3] ^= n;
		n = np << 24 | nc << 16 | np << 8 | nc;
		hash[4] ^= n;
		n = (nc ^ np);
		n = n << 8 | n;
		n = n << 16 | n;
		n ^= ~mask;
		hash[5] ^= n;
		for (j = 0; j < 6; ++j)
		{
			n = hash[j];
			hash[j] = hash[mask % 6];
			hash[mask % 6] = n;
			mask = ((mask >> 2) | (mask << 30)) + 2;
		}

		p = c;
	}
	*hash_out = hash;
	return 0;
}

#endif
Update 2018.07.18.: Beleraktam, hogy amennyiben a kimenet nem NULL, akkor nem allokál, hanem oda ír. np inicializálva, t eltávolítva (unused volt).


English | Magyar
JS ki | CSS ki | Ékezetek ki | HiContrast
Lapozó:  (0 - 1424) 
<== | ==>
Ugrás a végére | Összes megjelenítése | Utolsó oldal
OpenOpera patches | Opera-SSL patches | Opera 12.15 source (Git repository) | Opera 12.15 source (Torrent) | Opera internal pages | Otter Browser Linux x64 - Qt5.15.2/QtWebKit5.602.1 (2024.04.27. 20:05)
OS for MC680x0 | OS for PPC | OS for Sparc64 | besztofbégéaefcé | CSÉNDZSLOG | WebToolz | DDG Shit Filter | Google Shit Filter | Progz | Fast CSS Box | Browser | OS | Agent | Statisztika | BBCode
Monospace font-family: Courier New | Browser default monospace
Email értesítő / Email notification ===> 
Keresés

Név: (max 255 byte)

Email: (max 255 byte) Nem kötelező!

Üzenet: (max 65536 kar.) 65536-0=65536




crap_vkn v4.34.0 by TCH
Thx to saxus for the escaped string decoder function (PHP), the realIP function (PHP) & the SQL handle layer (PHP), to thookerov for the int_divide function (PHP), to Jeff Anderson for the getSelText function (JS), to Alex King for the insertAtCursor function (JS), Flood3r for the new CSS styles, Pety for the spamprotection idea and some design and comfort ideas, MaxMind for the IP2Country database, famfamfam for the flags of countries and an unknown PHP programmer for the removeAccents function.



Kecskebaszók ide!