| /NextBSD/sys/libkern/ |
| HD | murmur3_32.c | 48 uint32_t hash, k; in murmur3_32_hash() local 54 hash = seed; in murmur3_32_hash() 65 hash ^= k; in murmur3_32_hash() 66 hash = rol32(hash, 13); in murmur3_32_hash() 67 hash *= 5; in murmur3_32_hash() 68 hash += 0xe6546b64; in murmur3_32_hash() 85 hash ^= k; in murmur3_32_hash() 91 hash ^= (uint32_t)len; in murmur3_32_hash() 92 hash ^= hash >> 16; in murmur3_32_hash() 93 hash *= 0x85ebca6b; in murmur3_32_hash() [all …]
|
| /NextBSD/cddl/contrib/opensolaris/tools/ctf/cvt/ |
| HD | hash.c | 43 struct hash { struct 95 hash_t *hash; in hash_new() local 97 hash = xmalloc(sizeof (hash_t)); in hash_new() 98 hash->h_buckets = xcalloc(sizeof (list_t *) * nbuckets); in hash_new() 99 hash->h_nbuckets = nbuckets; in hash_new() 100 hash->h_hashfn = hashfn ? hashfn : hash_def_hash; in hash_new() 101 hash->h_cmp = cmp ? cmp : hash_def_cmp; in hash_new() 103 return (hash); in hash_new() 107 hash_add(hash_t *hash, void *key) in hash_add() argument 109 int bucket = hash->h_hashfn(hash->h_nbuckets, key); in hash_add() [all …]
|
| /NextBSD/usr.bin/grep/regex/ |
| HD | hashtable.c | 45 hash32_buf(const void *buf, size_t len, uint32_t hash) in hash32_buf() argument 50 hash = HASHSTEP(hash, *p++); in hash32_buf() 52 return hash; in hash32_buf() 107 uint32_t hash = 0; in hashtable_put() local 115 hash = hash32_buf(key, tbl->key_size, hash) % tbl->table_size; in hashtable_put() 116 DPRINT(("hashtable_put: calculated hash %" PRIu32 "\n", hash)); in hashtable_put() 125 if (tbl->entries[hash] == NULL) in hashtable_put() 127 else if (memcmp(tbl->entries[hash]->key, key, tbl->key_size) == 0) in hashtable_put() 129 memcpy(tbl->entries[hash]->value, value, tbl->value_size); in hashtable_put() 131 ", entry updated\n", hash)); in hashtable_put() [all …]
|
| /NextBSD/sys/sys/ |
| HD | hash.h | 45 hash32_buf(const void *buf, size_t len, uint32_t hash) in hash32_buf() argument 50 hash = HASHSTEP(hash, *p++); in hash32_buf() 52 return hash; in hash32_buf() 59 hash32_str(const void *buf, uint32_t hash) in hash32_str() argument 64 hash = HASHSTEP(hash, *p++); in hash32_str() 66 return hash; in hash32_str() 73 hash32_strn(const void *buf, size_t len, uint32_t hash) in hash32_strn() argument 78 hash = HASHSTEP(hash, *p++); in hash32_strn() 80 return hash; in hash32_strn() 89 hash32_stre(const void *buf, int end, const char **ep, uint32_t hash) in hash32_stre() argument [all …]
|
| /NextBSD/contrib/wpa/src/eap_common/ |
| HD | eap_pwd_common.c | 26 void eap_pwd_h_update(struct crypto_hash *hash, const u8 *data, size_t len) in eap_pwd_h_update() argument 28 crypto_hash_update(hash, data, len); in eap_pwd_h_update() 32 void eap_pwd_h_final(struct crypto_hash *hash, u8 *digest) in eap_pwd_h_final() argument 35 crypto_hash_finish(hash, digest, &len); in eap_pwd_h_final() 43 struct crypto_hash *hash; in eap_pwd_kdf() local 54 hash = crypto_hash_init(CRYPTO_HASH_ALG_HMAC_SHA256, in eap_pwd_kdf() 56 if (hash == NULL) in eap_pwd_kdf() 59 crypto_hash_update(hash, digest, SHA256_MAC_LEN); in eap_pwd_kdf() 60 crypto_hash_update(hash, (u8 *) &i, sizeof(u16)); in eap_pwd_kdf() 61 crypto_hash_update(hash, label, labellen); in eap_pwd_kdf() [all …]
|
| HD | eap_psk_common.c | 37 u8 hash[aes_block_size]; in eap_psk_derive_keys() local 41 if (aes_128_encrypt_block(kdk, rand_p, hash)) in eap_psk_derive_keys() 44 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 45 if (aes_128_encrypt_block(kdk, hash, tek)) in eap_psk_derive_keys() 47 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 51 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 52 if (aes_128_encrypt_block(kdk, hash, &msk[i * aes_block_size])) in eap_psk_derive_keys() 54 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 59 hash[aes_block_size - 1] ^= counter; in eap_psk_derive_keys() 60 if (aes_128_encrypt_block(kdk, hash, in eap_psk_derive_keys() [all …]
|
| /NextBSD/contrib/apr-util/test/ |
| HD | testpass.c | 46 const char *hash; member 80 passwords[i].hash)); in test_crypt() 126 char hash[100]; in test_shapass() local 128 apr_sha1_base64(pass, strlen(pass), hash); in test_shapass() 131 apr_password_validate(pass, hash)); in test_shapass() 133 apr_password_validate(pass2, hash)); in test_shapass() 140 char hash[100]; in test_md5pass() local 142 apr_md5_encode(pass, salt, hash, sizeof hash); in test_md5pass() 145 apr_password_validate(pass, hash)); in test_md5pass() 147 apr_password_validate(pass2, hash)); in test_md5pass() [all …]
|
| /NextBSD/contrib/apr-util/crypto/ |
| HD | apr_passwd.c | 83 const char *hash) in apr_password_validate() argument 89 if (hash[0] == '$' in apr_password_validate() 90 && hash[1] == '2' in apr_password_validate() 91 && (hash[2] == 'a' || hash[2] == 'y') in apr_password_validate() 92 && hash[3] == '$') { in apr_password_validate() 93 if (_crypt_blowfish_rn(passwd, hash, sample, sizeof(sample)) == NULL) in apr_password_validate() 96 else if (!strncmp(hash, apr1_id, strlen(apr1_id))) { in apr_password_validate() 100 apr_md5_encode(passwd, hash, sample, sizeof(sample)); in apr_password_validate() 102 else if (!strncmp(hash, APR_SHA1PW_ID, APR_SHA1PW_IDLEN)) { in apr_password_validate() 110 return (strcmp(passwd, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH; in apr_password_validate() [all …]
|
| /NextBSD/contrib/libstdc++/include/ext/ |
| D | hash_fun.h | 71 struct hash { }; struct 83 struct hash<char*> 91 struct hash<const char*> 99 struct hash<char> 107 struct hash<unsigned char> 115 struct hash<signed char> 123 struct hash<short> 131 struct hash<unsigned short> 139 struct hash<int> 147 struct hash<unsigned int> [all …]
|
| /NextBSD/contrib/subversion/subversion/libsvn_subr/ |
| HD | hash.c | 215 hash_read(apr_hash_t *hash, svn_stream_t *stream, const char *terminator, in hash_read() argument 235 apr_hash_set(hash, apr_pstrmemdup(pool, entry.key, entry.keylen), in hash_read() 242 apr_hash_set(hash, entry.key, entry.keylen, NULL); in hash_read() 253 hash_write(apr_hash_t *hash, apr_hash_t *oldhash, svn_stream_t *stream, in hash_write() argument 263 list = svn_sort__hash(hash, svn_sort_compare_items_lexically, pool); in hash_write() 308 if (! apr_hash_get(hash, item->key, item->klen)) in hash_write() 323 svn_error_t *svn_hash_read2(apr_hash_t *hash, svn_stream_t *stream, in svn_hash_read2() argument 326 return hash_read(hash, stream, terminator, FALSE, pool); in svn_hash_read2() 330 svn_error_t *svn_hash_read_incremental(apr_hash_t *hash, in svn_hash_read_incremental() argument 335 return hash_read(hash, stream, terminator, TRUE, pool); in svn_hash_read_incremental() [all …]
|
| /NextBSD/contrib/xz/src/liblzma/lz/ |
| HD | lz_encoder_mf.c | 121 if (mf->hash[i] <= subvalue) in normalize() 122 mf->hash[i] = EMPTY_HASH_VALUE; in normalize() 124 mf->hash[i] -= subvalue; in normalize() 311 const uint32_t delta2 = pos - mf->hash[hash_2_value]; in lzma_mf_hc3_find() 312 const uint32_t cur_match = mf->hash[FIX_3_HASH_SIZE + hash_value]; in lzma_mf_hc3_find() 314 mf->hash[hash_2_value] = pos; in lzma_mf_hc3_find() 315 mf->hash[FIX_3_HASH_SIZE + hash_value] = pos; in lzma_mf_hc3_find() 352 = mf->hash[FIX_3_HASH_SIZE + hash_value]; in lzma_mf_hc3_skip() 354 mf->hash[hash_2_value] = pos; in lzma_mf_hc3_skip() 355 mf->hash[FIX_3_HASH_SIZE + hash_value] = pos; in lzma_mf_hc3_skip() [all …]
|
| /NextBSD/contrib/netbsd-tests/lib/libcrypt/ |
| HD | t_crypt.c | 73 const char *hash; member 126 for (size_t i = 0; tests[i].hash; i++) { in ATF_TC_BODY() 127 char *hash = crypt(tests[i].pw, tests[i].hash); in ATF_TC_BODY() local 134 if (!hash) { in ATF_TC_BODY() 138 if (strcmp(hash, "*0") == 0 && strlen(tests[i].hash) < 13) in ATF_TC_BODY() 140 if (strcmp(hash, tests[i].hash)) in ATF_TC_BODY() 142 i, hash, tests[i].hash); in ATF_TC_BODY()
|
| /NextBSD/contrib/netbsd-tests/ipf/regress/ |
| HD | ip1 | 14 table role = ipf type = hash number = 2 16 table role = ipf type = hash number = 200 18 table role = nat type = hash number = 210 20 table role = auth type = hash number = 220 22 table role = count type = hash number = 230 25 table role = ipf type = hash number = 240 seed = 101 27 table role = nat type = hash number = 250 seed = 101 29 table role = auth type = hash number = 260 seed = 101 31 table role = count type = hash number = 270 seed = 101 34 table role = ipf type = hash number = 2000 size = 1001 [all …]
|
| /NextBSD/sys/dev/drm/ |
| HD | drm_auth.c | 52 int hash = drm_hash_magic(magic); in drm_find_file() local 56 for (pt = dev->magiclist[hash].head; pt; pt = pt->next) { in drm_find_file() 72 int hash; in drm_add_magic() local 79 hash = drm_hash_magic(magic); in drm_add_magic() 87 if (dev->magiclist[hash].tail) { in drm_add_magic() 88 dev->magiclist[hash].tail->next = entry; in drm_add_magic() 89 dev->magiclist[hash].tail = entry; in drm_add_magic() 91 dev->magiclist[hash].head = entry; in drm_add_magic() 92 dev->magiclist[hash].tail = entry; in drm_add_magic() 106 int hash; in drm_remove_magic() local [all …]
|
| /NextBSD/contrib/netbsd-tests/ipf/expected/ |
| HD | ip1 | 11 table role=ipf type=hash number=2 size=1 13 table role=ipf type=hash number=200 size=5 15 table role=nat type=hash number=210 size=5 17 table role=auth type=hash number=220 size=5 19 table role=count type=hash number=230 size=5 21 table role=ipf type=hash number=240 size=5 seed=101 23 table role=nat type=hash number=250 size=5 seed=101 25 table role=auth type=hash number=260 size=5 seed=101 27 table role=count type=hash number=270 size=5 seed=101 29 table role=ipf type=hash number=2000 size=1001 [all …]
|
| /NextBSD/sys/netinet6/ |
| HD | in6_pcbgroup.c | 55 in6_pcbgroup_getbucket(struct inpcbinfo *pcbinfo, uint32_t hash) in in6_pcbgroup_getbucket() argument 59 return (rss_getbucket(hash)); in in6_pcbgroup_getbucket() 61 return (hash % pcbinfo->ipi_npcbgroups); in in6_pcbgroup_getbucket() 72 in6_pcbgroup_byhash(struct inpcbinfo *pcbinfo, u_int hashtype, uint32_t hash) in in6_pcbgroup_byhash() argument 83 in6_pcbgroup_getbucket(pcbinfo, hash)]); in in6_pcbgroup_byhash() 100 uint32_t hash; in in6_pcbgroup_bytuple() local 110 hash = rss_hash_ip6_4tuple(faddrp, fport, laddrp, lport); in in6_pcbgroup_bytuple() 112 hash = faddrp->s6_addr32[3] ^ fport; in in6_pcbgroup_bytuple() 118 hash = rss_hash_ip6_2tuple(faddrp, laddrp); in in6_pcbgroup_bytuple() 120 hash = faddrp->s6_addr32[3] ^ laddrp->s6_addr32[3]; in in6_pcbgroup_bytuple() [all …]
|
| /NextBSD/lib/libc/stdlib/ |
| HD | hsearch_r.c | 44 hsearch_lookup_free(struct __hsearch *hsearch, size_t hash) in hsearch_lookup_free() argument 48 for (index = hash, i = 0;; index += ++i) { in hsearch_lookup_free() 62 size_t hash; in hsearch_hash() local 64 hash = offset_basis; in hsearch_hash() 66 hash ^= (uint8_t)*str++; in hsearch_hash() 68 hash *= UINT32_C(16777619); in hsearch_hash() 70 hash *= UINT64_C(1099511628211); in hsearch_hash() 72 return (hash); in hsearch_hash() 80 size_t hash, index, i, old_hash, old_count, new_count; in hsearch_r() local 83 hash = hsearch_hash(hsearch->offset_basis, item.key); in hsearch_r() [all …]
|
| /NextBSD/contrib/apr/tables/ |
| HD | apr_tables.c | 451 int hash; in table_reindex() local 456 hash = TABLE_HASH(next_elt->key); in table_reindex() 457 t->index_last[hash] = i; in table_reindex() 458 if (!TABLE_INDEX_IS_INITIALIZED(t, hash)) { in table_reindex() 459 t->index_first[hash] = i; in table_reindex() 460 TABLE_SET_INDEX_INITIALIZED(t, hash); in table_reindex() 476 int hash; in apr_table_get() local 482 hash = TABLE_HASH(key); in apr_table_get() 483 if (!TABLE_INDEX_IS_INITIALIZED(t, hash)) { in apr_table_get() 487 next_elt = ((apr_table_entry_t *) t->a.elts) + t->index_first[hash];; in apr_table_get() [all …]
|
| HD | apr_hash.c | 49 unsigned int hash; member 202 unsigned int i = hi->this->hash & new_max; in expand_array() 211 unsigned int hash) in hashfunc_default() 257 hash = hash * 33 + *p; in hashfunc_default() 263 hash = hash * 33 + *p; in hashfunc_default() 267 return hash; in hashfunc_default() 291 unsigned int hash; in find_entry() local 294 hash = ht->hash_func(key, &klen); in find_entry() 296 hash = hashfunc_default(key, &klen, ht->seed); in find_entry() 299 for (hep = &ht->array[hash & ht->max], he = *hep; in find_entry() [all …]
|
| /NextBSD/contrib/libstdc++/include/tr1/ |
| D | functional_hash.h | 48 struct hash; 52 struct hash<_Tp> \ 77 struct hash<_Tp*> 93 hash(const char* __first, std::size_t __length) 106 hash(const char* __first, std::size_t __length) 122 hash(const char* __first, std::size_t __length) 139 struct hash<std::string> 144 { return _Fnv_hash<>::hash(__s.data(), __s.length()); } 149 struct hash<std::wstring> 155 return _Fnv_hash<>::hash(reinterpret_cast<const char*>(__s.data()), [all …]
|
| /NextBSD/contrib/jansson/src/ |
| HD | hashtable.c | 76 const char *key, size_t hash) in hashtable_find_pair() argument 88 if(pair->hash == hash && strcmp(pair->key, key) == 0) in hashtable_find_pair() 102 const char *key, size_t hash) in hashtable_do_del() argument 108 index = hash & hashmask(hashtable->order); in hashtable_do_del() 111 pair = hashtable_find_pair(hashtable, bucket, key, hash); in hashtable_do_del() 174 index = pair->hash % new_size; in hashtable_do_rehash() 215 size_t hash, index; in hashtable_set() local 222 hash = hash_str(key); in hashtable_set() 223 index = hash & hashmask(hashtable->order); in hashtable_set() 225 pair = hashtable_find_pair(hashtable, bucket, key, hash); in hashtable_set() [all …]
|
| /NextBSD/crypto/openssl/crypto/lhash/ |
| HD | lhash.c | 127 ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h); in lh_new() 180 unsigned long hash; in lh_insert() local 188 rn = getrn(lh, data, &hash); in lh_insert() 198 nn->hash = hash; in lh_insert() 215 unsigned long hash; in lh_delete() local 220 rn = getrn(lh, data, &hash); in lh_delete() 243 unsigned long hash; in lh_retrieve() local 248 rn = getrn(lh, data, &hash); in lh_retrieve() 307 unsigned long hash, nni; in expand() local 319 hash = np->hash; in expand() [all …]
|
| /NextBSD/lib/libc/iconv/ |
| HD | citrus_db_hash.c | 47 uint32_t hash, tmp; in _citrus_db_hash_std() local 50 hash = 0; in _citrus_db_hash_std() 54 hash <<= 4; in _citrus_db_hash_std() 55 hash += _bcs_tolower(*p); in _citrus_db_hash_std() 56 tmp = hash & 0xF0000000; in _citrus_db_hash_std() 58 hash ^= tmp; in _citrus_db_hash_std() 59 hash ^= tmp >> 24; in _citrus_db_hash_std() 63 return (hash); in _citrus_db_hash_std()
|
| /NextBSD/contrib/subversion/subversion/libsvn_fs_x/ |
| HD | reps.c | 165 hash_t hash; member 300 hash_to_index(hash_t *hash, hash_key_t adler32) in hash_to_index() argument 302 return (adler32 * 0xd1f3da69) >> hash->shift; in hash_to_index() 309 allocate_hash_members(hash_t *hash, in allocate_hash_members() argument 315 hash->pool = result_pool; in allocate_hash_members() 316 hash->size = size; in allocate_hash_members() 318 hash->prefixes = apr_pcalloc(result_pool, size); in allocate_hash_members() 319 hash->last_matches = apr_pcalloc(result_pool, in allocate_hash_members() 320 sizeof(*hash->last_matches) * size); in allocate_hash_members() 321 hash->offsets = apr_palloc(result_pool, sizeof(*hash->offsets) * size); in allocate_hash_members() [all …]
|
| /NextBSD/sys/dev/drm2/ttm/ |
| HD | ttm_object.c | 113 struct drm_hash_item hash; member 167 &base->hash, in ttm_base_object_init() 182 (void)drm_ht_remove_item(&tdev->object_hash, &base->hash); in ttm_base_object_init() 192 (void)drm_ht_remove_item(&tdev->object_hash, &base->hash); in ttm_release_base() 230 struct drm_hash_item *hash; in ttm_base_object_lookup() local 234 ret = drm_ht_find_item(&tdev->object_hash, key, &hash); in ttm_base_object_lookup() 237 base = drm_hash_entry(hash, struct ttm_base_object, hash); in ttm_base_object_lookup() 263 struct drm_hash_item *hash; in ttm_ref_object_add() local 272 ret = drm_ht_find_item(ht, base->hash.key, &hash); in ttm_ref_object_add() 275 ref = drm_hash_entry(hash, struct ttm_ref_object, hash); in ttm_ref_object_add() [all …]
|