| /src/sys/sys/ |
| hash.h | 1 /* $NetBSD: hash.h,v 1.8 2014/09/05 05:46:15 matt Exp $ */ 38 #include <machine/hash.h> 41 #ifndef __HAVE_HASH32_BUF /* not overridden by MD hash */ 47 * hash32_buf(const void *bf, size_t len, uint32_t hash) 48 * return a 32 bit hash of the binary buffer buf (size len), 49 * seeded with an initial hash value of hash (usually HASH32_BUF_INIT). 52 hash32_buf(const void *bf, size_t len, uint32_t hash) 57 hash = hash * 257 + *s++ [all...] |
| /src/lib/libintl/ |
| strhash.c | 40 * string hash function by P.J.Weinberger. 48 uint32_t hash = 0, tmp; local in function:__intl_string_hash 51 hash <<= 4; 52 hash += *p; 53 tmp = hash & 0xF0000000; 55 hash ^= tmp; 56 hash ^= tmp >> 24; 59 return hash;
|
| /src/tests/lib/libcrypt/ |
| t_crypt.c | 73 const char *hash; member in struct:__anondf4c2ba30108 143 for (size_t i = 0; tests[i].hash; i++) { 144 char *hash = crypt(tests[i].pw, tests[i].hash); local in function:ATF_TC_BODY 145 if (!hash) { 149 if (strcmp(hash, "*0") == 0 && strlen(tests[i].hash) < 13) 151 if (strcmp(hash, tests[i].hash)) 153 i, hash, tests[i].hash) [all...] |
| /src/lib/libc/citrus/ |
| citrus_db_hash.c | 57 uint32_t hash = 0, tmp; local in function:_citrus_db_hash_std 61 hash <<= 4; 62 hash += _bcs_tolower(*p); 63 tmp = hash & 0xF0000000; 65 hash ^= tmp; 66 hash ^= tmp >> 24; 70 return hash;
|
| /src/sys/external/bsd/drm2/dist/drm/vboxvideo/ |
| vbox_hgsmi.c | 16 /* One-at-a-Time Hash from http://www.burtleburtle.net/bob/hash/doobs.html */ 17 static u32 hgsmi_hash_process(u32 hash, const u8 *data, int size) 20 hash += *data++; 21 hash += (hash << 10); 22 hash ^= (hash >> 6); 25 return hash; 28 static u32 hgsmi_hash_end(u32 hash) [all...] |
| /src/sys/net/agr/ |
| if_agrether_hash.c | 34 #include <sys/hash.h> 48 #define HASH(p, l, h) hash32_buf((p), (l), (h)) 76 uint32_t hash = HASH32_BUF_INIT; local in function:agrether_hashmbuf 83 return hash; 86 hash = HASH(&eh->ether_dhost, sizeof(eh->ether_dhost), hash); 87 hash = HASH(&eh->ether_shost, sizeof(eh->ether_shost), hash); [all...] |
| /src/usr.bin/cksum/ |
| cksum.c | 112 const struct hash { struct 148 static int hash_digest_file(char *, const struct hash *, int); 162 const struct hash *hash; local in function:main 177 for (hash = hashes; hash->hashname != NULL; hash++) 178 if (strcmp(progname, hash->progname) == 0) 181 if (hash->hashname == NULL) { 182 hash = NULL [all...] |
| /src/sys/ufs/ext2fs/ |
| ext2fs_hash.c | 176 ext2fs_half_md4(uint32_t hash[4], uint32_t data[8]) 178 uint32_t a = hash[0], b = hash[1], c = hash[2], d = hash[3]; 210 hash[0] += a; 211 hash[1] += b; 212 hash[2] += c; 213 hash[3] += d; 220 ext2fs_tea(uint32_t hash[4], uint32_t data[8] 244 uint32_t hash[4]; local in function:ext2fs_htree_hash [all...] |
| /src/sys/external/bsd/drm/dist/bsd-core/ |
| drm_auth.c | 49 int hash = drm_hash_magic(magic); local in function:drm_find_file 53 for (pt = dev->magiclist[hash].head; pt; pt = pt->next) { 63 * Inserts the given magic number into the hash table of used magic number 69 int hash; local in function:drm_add_magic 76 hash = drm_hash_magic(magic); 84 if (dev->magiclist[hash].tail) { 85 dev->magiclist[hash].tail->next = entry; 86 dev->magiclist[hash].tail = entry; 88 dev->magiclist[hash].head = entry; 89 dev->magiclist[hash].tail = entry 103 int hash; local in function:drm_remove_magic [all...] |
| /src/sys/external/bsd/gnu-efi/dist/gnuefi/ |
| elf_x86_64_fbsd_efi.lds | 11 /* .hash and/or .gnu.hash MUST come first! */ 12 .hash : { *(.hash) } 13 .gnu.hash : { *(.gnu.hash) }
|
| elf_ia32_efi.lds | 10 /* .hash and/or .gnu.hash MUST come first! */ 11 .hash : { *(.hash) } 12 .gnu.hash : { *(.gnu.hash) }
|
| elf_ia32_fbsd_efi.lds | 10 /* .hash and/or .gnu.hash MUST come first! */ 11 .hash : { *(.hash) } 12 .gnu.hash : { *(.gnu.hash) }
|
| elf_ia64_efi.lds | 10 /* .hash and/or .gnu.hash MUST come first! */ 11 .hash : { *(.hash) } 12 .gnu.hash : { *(.gnu.hash) }
|
| elf_x86_64_efi.lds | 11 /* .hash and/or .gnu.hash MUST come first! */ 12 .hash : { *(.hash) } 13 .gnu.hash : { *(.gnu.hash) }
|
| /src/sys/coda/ |
| coda_namecache.c | 64 * hash table. 99 int coda_nc_hashsize = CODA_NC_HASHSIZE; /* size of the primary hash */ 102 struct coda_hash *coda_nc_hash; /* hash table of cfscache pointers */ 117 kauth_cred_t cred, int hash); 122 * Initialize the cache, the LRU structure and the Hash structure(s) 140 printf("CODA NAME CACHE: CACHE %d, HASH TBL %d\n", CODA_NC_CACHESIZE, CODA_NC_HASHSIZE); 167 kauth_cred_t cred, int hash) 170 * hash to find the appropriate bucket, look through the chain 177 myprintf(("coda_nc_find(dcp %p, name %s, len %d, cred %p, hash %d\n", 178 dcp, name, namelen, cred, hash));) 220 int hash; local in function:coda_nc_enter 291 int hash; local in function:coda_nc_lookup 472 int hash; local in function:coda_nc_zapfile 515 int hash; local in function:coda_nc_purge_user 611 int hash; local in function:print_coda_nc [all...] |
| /src/usr.bin/make/unit-tests/ |
| varmod-hash.mk | 1 # $NetBSD: varmod-hash.mk,v 1.6 2024/07/20 11:05:12 rillig Exp $ 3 # Tests for the :hash variable modifier, which computes a 32-bit hash from 53 .for hash input in ${VECTORS} 54 . if ${input:S,^""$,,:hash} != ${hash} 55 . warning Expected ${hash} for ${input}, but was ${input:hash}. 63 @echo ${12345:L:hash} # ok 65 @echo ${12345:L:hash=SHA-256} # :hash does not accept '= [all...] |
| /src/sys/external/bsd/drm2/include/linux/ |
| hashtable.h | 37 #include <linux/hash.h> 44 __hash_init(struct hlist_head *hash, unsigned n) 48 INIT_HLIST_HEAD(&hash[n]); 52 __hash_empty(struct hlist_head *hash, unsigned n) 56 if (!hlist_empty(&hash[n]))
|
| /src/usr.sbin/mtree/ |
| only.c | 58 uint32_t hash; member in struct:hentry 70 uint32_t hash = 0; local in function:hash_str 72 hash = hash * 33 + c; /* "perl": k=33, r=r+r/32 */ 73 return hash + (hash >> 5); 83 if (e->hash == *h && strcmp(e->str, str) == 0) 100 e->hash = h;
|
| /src/libexec/ld.elf_so/ |
| symbol.c | 60 #include "hash.h" 85 _rtld_symlook_list(const char *name, Elf_Hash *hash, const Objlist *objlist, 101 symp = _rtld_symlook_obj(name, hash, elm->obj, flags, ventry); 123 _rtld_symlook_needed(const char *name, Elf_Hash *hash, 138 def = _rtld_symlook_obj(name, hash, obj, flags, ventry); 157 def_w = _rtld_symlook_needed(name, hash, obj->needed, &defobj1, 264 if (obj->vertab[verndx].hash != ventry->hash || 292 * SysV Hash version. 295 _rtld_symlook_obj_sysv(const char *name, unsigned long hash, 408 Elf_Hash hash; local in function:_rtld_find_symdef [all...] |
| /src/tests/usr.bin/nbperf/ |
| hash_driver.c | 37 #include "hash.c" 49 printf("%" PRId32 "\n", hash(line, len));
|
| /src/sys/external/isc/libsodium/dist/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ |
| box_curve25519xsalsa20poly1305.c | 16 unsigned char hash[64]; local in function:crypto_box_curve25519xsalsa20poly1305_seed_keypair 18 crypto_hash_sha512(hash, seed, 32); 19 memcpy(sk, hash, 32); 20 sodium_memzero(hash, sizeof hash);
|
| /src/usr.sbin/veriexecgen/ |
| veriexecgen.c | 70 /* this struct defines a hash algorithm */ 81 int exit_on_error; /* exit if we can't create a hash */ 91 /* this struct describes a directory entry to generate a hash for */ 94 char *hash_val; /* its associated hash value */ 100 /* define the possible hash algorithms */ 157 /* find a hash algorithm, given its name */ 161 hash_t *hash; local in function:find_hash 163 for (hash = hashes; hash->hashname != NULL; hash++ 439 hash_t *hash = NULL; local in function:main [all...] |
| /src/games/adventure/ |
| vocab.c | 137 int hash, i; local in function:vocab 140 for (hash = 0, s = word, i = 0; i < 5 && *s; i++) /* some kind of hash*/ 141 hash += *s++; /* add all chars in the word */ 142 hash = (hash * 3719) & 077777; /* pulled that one out of a hat */ 143 hash %= HTSIZE; /* put it into range of table */ 145 for (adr = hash;; adr++) { /* look for entry in table */ 187 if (adr + 1 == hash || hash == 0 [all...] |
| /src/sys/external/bsd/drm2/dist/drm/vmwgfx/ |
| vmwgfx_cmdbuf_res.c | 42 * @hash: Hash entry for the manager hash table. 50 struct drm_hash_item hash; member in struct:vmw_cmdbuf_res 59 * @resources: Hash table containing staged and commited command buffer 89 struct drm_hash_item *hash; local in function:vmw_cmdbuf_res_lookup 93 ret = drm_ht_find_item(&man->resources, key, &hash); 97 return drm_hash_entry(hash, struct vmw_cmdbuf_res, hash)->res; 113 WARN_ON(drm_ht_remove_item(&man->resources, &entry->hash)); 254 struct drm_hash_item *hash; local in function:vmw_cmdbuf_res_remove [all...] |
| /src/usr.bin/finger/ |
| extern.h | 49 int hash(char *);
|