| /freebsd-12.1/sys/libkern/ |
| H A D | murmur3_32.c | 65 hash ^= k; in murmur3_32_hash() 66 hash = rol32(hash, 13); in murmur3_32_hash() 67 hash *= 5; in murmur3_32_hash() 92 hash ^= hash >> 16; in murmur3_32_hash() 94 hash ^= hash >> 13; in murmur3_32_hash() 96 hash ^= hash >> 16; in murmur3_32_hash() 117 hash ^= k; in murmur3_32_hash32() 118 hash = rol32(hash, 13); in murmur3_32_hash32() 125 hash ^= hash >> 16; in murmur3_32_hash32() 127 hash ^= hash >> 13; in murmur3_32_hash32() [all …]
|
| /freebsd-12.1/cddl/contrib/opensolaris/tools/ctf/cvt/ |
| H A D | hash.c | 43 struct hash { struct 95 hash_t *hash; in hash_new() local 103 return (hash); in hash_new() 109 int bucket = hash->h_hashfn(hash->h_nbuckets, key); in hash_add() 137 int bucket = hash->h_hashfn(hash->h_nbuckets, key); in hash_remove() 147 int bucket = hash->h_hashfn(hash->h_nbuckets, key); in hash_match() 172 int bucket = hash->h_hashfn(hash->h_nbuckets, key); in hash_find_iter() 175 hd.hd_hash = hash; in hash_find_iter() 203 hd.hd_hash = hash; in hash_find() 249 if (hash == NULL) in hash_free() [all …]
|
| /freebsd-12.1/sys/sys/ |
| H A D | hash.h | 52 hash = HASHSTEP(hash, *p++); in hash32_buf() 54 return hash; in hash32_buf() 66 hash = HASHSTEP(hash, *p++); in hash32_str() 68 return hash; in hash32_str() 80 hash = HASHSTEP(hash, *p++); in hash32_strn() 82 return hash; in hash32_strn() 96 hash = HASHSTEP(hash, *p++); in hash32_stre() 101 return hash; in hash32_stre() 111 uint32_t hash) in hash32_strne() argument 116 hash = HASHSTEP(hash, *p++); in hash32_strne() [all …]
|
| /freebsd-12.1/sys/fs/ext2fs/ |
| H A D | ext2_hash.c | 120 uint32_t a = hash[0], b = hash[1], c = hash[2], d = hash[3]; in ext2_half_md4() 152 hash[0] += a; in ext2_half_md4() 153 hash[1] += b; in ext2_half_md4() 154 hash[2] += c; in ext2_half_md4() 155 hash[3] += d; in ext2_half_md4() 166 uint32_t x = hash[0], y = hash[1]; in ext2_tea() 177 hash[0] += x; in ext2_tea() 178 hash[1] += y; in ext2_tea() 259 uint32_t hash[4]; in ext2_htree_hash() local 276 memcpy(hash, hash_seed, sizeof(hash)); in ext2_htree_hash() [all …]
|
| /freebsd-12.1/contrib/apr-util/crypto/ |
| H A D | 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() 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() 117 crypt_pw = crypt_r(passwd, hash, buffer); in apr_password_validate() 148 crypt_pw = crypt_r(passwd, hash, buffer); in apr_password_validate() [all …]
|
| /freebsd-12.1/contrib/apr-util/test/ |
| H A D | testpass.c | 46 const char *hash; member 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() 154 const char *hash; member 182 char hash[100]; in test_bcryptpass() local [all …]
|
| /freebsd-12.1/contrib/wpa/src/eap_common/ |
| H A D | eap_pwd_common.c | 48 struct crypto_hash *hash; in eap_pwd_kdf() local 61 if (hash == NULL) in eap_pwd_kdf() 131 struct crypto_hash *hash; in compute_password_element() local 190 hash = eap_pwd_h_init(); in compute_password_element() 191 if (hash == NULL) in compute_password_element() 310 struct crypto_hash *hash; in compute_keys() local 327 hash = eap_pwd_h_init(); in compute_keys() 328 if (hash == NULL) { in compute_keys() 340 hash = eap_pwd_h_init(); in compute_keys() 341 if (hash == NULL) { in compute_keys() [all …]
|
| H A D | 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 …]
|
| /freebsd-12.1/contrib/libstdc++/include/ext/ |
| H A 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> 139 struct hash<int> 147 struct hash<unsigned int> 155 struct hash<long> [all …]
|
| /freebsd-12.1/contrib/subversion/subversion/libsvn_subr/ |
| H A D | hash.c | 371 svn_hash_read(apr_hash_t *hash, in svn_hash_read() argument 532 apr_hash_t *hash, in svn_hash_keys() argument 559 svn_hash_sets(hash, key, key); in svn_hash_from_cstring_keys() 561 *hash_p = hash; in svn_hash_from_cstring_keys() 584 svn_hash__get_cstring(apr_hash_t *hash, in svn_hash__get_cstring() argument 588 if (hash) in svn_hash__get_cstring() 631 unsigned int hash = 0; in hashfunc_compatible() local 646 hash = hash * 33 * 33 * 33 * 33 + chunk + (chunk >> 17); in hashfunc_compatible() 651 hash = hash * 33 * 33 * 33 * 33 in hashfunc_compatible() 659 hash = hash * 33 + *p; in hashfunc_compatible() [all …]
|
| /freebsd-12.1/contrib/netbsd-tests/lib/libcrypt/ |
| H A D | 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()
|
| /freebsd-12.1/contrib/xz/src/liblzma/lz/ |
| H A D | lz_encoder_mf.c | 121 if (mf->hash[i] <= subvalue) in normalize() 124 mf->hash[i] -= subvalue; in normalize() 314 mf->hash[hash_2_value] = pos; in lzma_mf_hc3_find() 354 mf->hash[hash_2_value] = pos; in lzma_mf_hc3_skip() 377 mf->hash[hash_2_value ] = pos; in lzma_mf_hc4_find() 433 mf->hash[hash_2_value] = pos; in lzma_mf_hc4_skip() 594 mf->hash[hash_value] = pos; in lzma_mf_bt2_find() 609 mf->hash[hash_value] = pos; in lzma_mf_bt2_skip() 629 mf->hash[hash_2_value] = pos; in lzma_mf_bt3_find() 663 mf->hash[hash_2_value] = pos; in lzma_mf_bt3_skip() [all …]
|
| /freebsd-12.1/contrib/netbsd-tests/ipf/regress/ |
| H A D | 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 …]
|
| /freebsd-12.1/lib/libpmcstat/ |
| H A D | libpmcstat_string.c | 60 int hash, len; in pmcstat_string_intern() local 65 hash = pmcstat_string_compute_hash(s); in pmcstat_string_intern() 71 ps->ps_hash = hash; in pmcstat_string_intern() 93 unsigned hash; in pmcstat_string_compute_hash() local 95 for (hash = 2166136261; *s; s++) in pmcstat_string_compute_hash() 96 hash = (hash ^ *s) * 16777619; in pmcstat_string_compute_hash() 98 return (hash & PMCSTAT_HASH_MASK); in pmcstat_string_compute_hash() 105 int hash, len; in pmcstat_string_lookup() local 107 hash = pmcstat_string_compute_hash(s); in pmcstat_string_lookup() 110 LIST_FOREACH(ps, &pmcstat_string_hash[hash], ps_next) in pmcstat_string_lookup() [all …]
|
| /freebsd-12.1/sys/dev/drm/ |
| H A D | drm_auth.c | 52 int hash = drm_hash_magic(magic); in drm_find_file() local 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() 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 111 hash = drm_hash_magic(magic); in drm_remove_magic() 115 if (dev->magiclist[hash].head == pt) { in drm_remove_magic() [all …]
|
| /freebsd-12.1/contrib/netbsd-tests/ipf/expected/ |
| H A D | 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 29 table role=ipf type=hash number=2000 size=1001 31 table role=nat type=hash number=2000 size=1001 33 table role=auth type=hash number=2000 size=1001 [all …]
|
| /freebsd-12.1/sys/netinet6/ |
| H A D | in6_pcbgroup.c | 58 in6_pcbgroup_getbucket(struct inpcbinfo *pcbinfo, uint32_t hash) in in6_pcbgroup_getbucket() argument 62 return (rss_getbucket(hash)); in in6_pcbgroup_getbucket() 64 return (hash % pcbinfo->ipi_npcbgroups); in in6_pcbgroup_getbucket() 86 in6_pcbgroup_getbucket(pcbinfo, hash)]); in in6_pcbgroup_byhash() 103 uint32_t hash; in in6_pcbgroup_bytuple() local 113 hash = rss_hash_ip6_4tuple(faddrp, fport, laddrp, lport); in in6_pcbgroup_bytuple() 115 hash = faddrp->s6_addr32[3] ^ fport; in in6_pcbgroup_bytuple() 121 hash = rss_hash_ip6_2tuple(faddrp, laddrp); in in6_pcbgroup_bytuple() 123 hash = faddrp->s6_addr32[3] ^ laddrp->s6_addr32[3]; in in6_pcbgroup_bytuple() 128 hash = 0; in in6_pcbgroup_bytuple() [all …]
|
| /freebsd-12.1/lib/libc/stdlib/ |
| H A D | hsearch_r.c | 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() 89 for (index = hash, i = 0;; index += ++i) { in hsearch_r() [all …]
|
| /freebsd-12.1/contrib/apr/tables/ |
| H A D | apr_tables.c | 451 int hash; in table_reindex() local 476 int hash; in apr_table_get() local 482 hash = TABLE_HASH(key); in apr_table_get() 507 int hash; in apr_table_set() local 510 hash = TABLE_HASH(key); in apr_table_set() 579 int hash; in apr_table_setn() local 650 int hash; in apr_table_unset() local 704 int hash; in apr_table_merge() local 741 int hash; in apr_table_mergen() local 795 int hash; in apr_table_add() local [all …]
|
| H A D | apr_hash.c | 49 unsigned int hash; member 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 301 if (he->hash == hash in find_entry() 315 he->hash = hash; in find_entry() 350 (*new_entry)->hash = orig_entry->hash; in apr_hash_copy() 436 unsigned int i, j, k, hash; in apr_hash_merge() local 477 new_vals[j].hash = iter->hash; in apr_hash_merge() [all …]
|
| /freebsd-12.1/sys/kern/ |
| H A D | vfs_hash.c | 68 vfs_hash_bucket(const struct mount *mp, u_int hash) in vfs_hash_bucket() argument 71 return (&vfs_hash_tbl[(hash + mp->mnt_hashseed) & vfs_hash_mask]); in vfs_hash_bucket() 83 LIST_FOREACH(vp, vfs_hash_bucket(mp, hash), v_hashlist) { in vfs_hash_get() 84 if (vp->v_hash != hash) in vfs_hash_get() 116 LIST_FOREACH(vp, vfs_hash_bucket(mp, hash), v_hashlist) { in vfs_hash_ref() 117 if (vp->v_hash != hash) in vfs_hash_ref() 158 vfs_hash_bucket(vp->v_mount, hash), v_hashlist) { in vfs_hash_insert() 159 if (vp2->v_hash != hash) in vfs_hash_insert() 182 vp->v_hash = hash; in vfs_hash_insert() 189 vfs_hash_rehash(struct vnode *vp, u_int hash) in vfs_hash_rehash() argument [all …]
|
| /freebsd-12.1/contrib/libstdc++/include/tr1/ |
| H A 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> 149 struct hash<std::wstring> 162 struct hash<float> 179 struct hash<double> [all …]
|
| /freebsd-12.1/lib/libc/iconv/ |
| H A D | citrus_db_hash.c | 49 uint32_t hash, tmp; in _citrus_db_hash_std() local 52 hash = 0; in _citrus_db_hash_std() 56 hash <<= 4; in _citrus_db_hash_std() 57 hash += _bcs_tolower(*p); in _citrus_db_hash_std() 58 tmp = hash & 0xF0000000; in _citrus_db_hash_std() 60 hash ^= tmp; in _citrus_db_hash_std() 61 hash ^= tmp >> 24; in _citrus_db_hash_std() 65 return (hash); in _citrus_db_hash_std()
|
| /freebsd-12.1/contrib/subversion/subversion/libsvn_fs_x/ |
| H A D | reps.c | 165 hash_t hash; member 315 hash->pool = result_pool; in allocate_hash_members() 316 hash->size = size; in allocate_hash_members() 321 hash->offsets = apr_palloc(result_pool, sizeof(*hash->offsets) * size); in allocate_hash_members() 324 hash->offsets[i] = NO_OFFSET; in allocate_hash_members() 331 init_hash(hash_t *hash, in init_hash() argument 335 hash->used = 0; in init_hash() 345 grow_hash(hash_t *hash, in grow_hash() argument 367 for (i = 0; i < hash->size; ++i) in grow_hash() 384 *hash = copy; in grow_hash() [all …]
|
| /freebsd-12.1/sys/dev/drm2/ttm/ |
| H A D | ttm_object.c | 113 struct drm_hash_item hash; member 167 &base->hash, in ttm_base_object_init() 230 struct drm_hash_item *hash; in ttm_base_object_lookup() local 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() 292 ref->hash.key = base->hash.key; in ttm_ref_object_add() 346 struct drm_hash_item *hash; in ttm_ref_object_base_unref() local 350 ret = drm_ht_find_item(ht, key, &hash); in ttm_ref_object_base_unref() [all …]
|