Sha256: a95d713205936a5b36ce8a84c8a7d646571724ed2558db554b0b4a53f16da897
Contents?: true
Size: 378 Bytes
Versions: 3
Compression:
Stored size: 378 Bytes
Contents
#include <stdio.h> #include <stdint.h> uint32_t dl_new_hash (const char *s) { uint32_t h = 5381; for (unsigned char c = *s; c != '\0'; c = *++s) h = h * 33 + c; return h; } int main(){ while(!feof(stdin)){ char buf[1024]; scanf("%1024s",buf); unsigned long ehash1 = dl_new_hash(buf); printf("%lu \n",ehash1); } }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
elf-mithril-0.0.5 | tools/gnu_elf_hash_test.cxx |
elf-mithril-0.0.4 | tools/gnu_elf_hash_test.cxx |
elf-mithril-0.0.1 | tools/gnu_elf_hash_test.cxx |