Welcome to mirror list, hosted at ThFree Co, Russian Federation.

hash.c « src - github.com/rofl0r/proxychains-ng.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 792dd8765ade3a4634550e9a573c5077e5543c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "hash.h"

/* dalias' version of the elf hash */
uint32_t dalias_hash(char *s0) {
	unsigned char *s = (void *) s0;
	uint_fast32_t h = 0;
	while(*s) {
		h = 16 * h + *s++;
		h ^= h >> 24 & 0xf0;
	}
	return h & 0xfffffff;
}