/freebsd/sys/libkern/ |
H A D | murmur3_32.c | 63 hash ^= k; in murmur3_32_hash() 64 hash = rol32(hash, 13); in murmur3_32_hash() 65 hash *= 5; in murmur3_32_hash() 90 hash ^= hash >> 16; in murmur3_32_hash() 92 hash ^= hash >> 13; in murmur3_32_hash() 94 hash ^= hash >> 16; in murmur3_32_hash() 115 hash ^= k; in murmur3_32_hash32() 116 hash = rol32(hash, 13); in murmur3_32_hash32() 123 hash ^= hash >> 16; in murmur3_32_hash32() 125 hash ^= hash >> 13; in murmur3_32_hash32() [all …]
|
/freebsd/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/crypto/openssl/providers/implementations/rands/ |
H A D | drbg_hash.c | 186 && add_bytes(drbg, hash->V, hash->vtmp, hash->blocklen); in add_hash_to_v() 214 memcpy(hash->vtmp, hash->V, drbg->seedlen); in hash_gen() 222 if (!EVP_DigestFinal(hash->ctx, hash->vtmp, NULL)) in hash_gen() 299 memcpy(hash->V, hash->C, drbg->seedlen); in drbg_hash_reseed() 301 return hash_df1(drbg, hash->C, 0x00, hash->V, drbg->seedlen); in drbg_hash_reseed() 347 && add_bytes(drbg, hash->V, hash->C, drbg->seedlen) in drbg_hash_generate() 366 OPENSSL_cleanse(hash->V, sizeof(hash->V)); in drbg_hash_uninstantiate() 367 OPENSSL_cleanse(hash->C, sizeof(hash->C)); in drbg_hash_uninstantiate() 368 OPENSSL_cleanse(hash->vtmp, sizeof(hash->vtmp)); in drbg_hash_uninstantiate() 392 hash = OPENSSL_secure_zalloc(sizeof(*hash)); in drbg_hash_new() [all …]
|
/freebsd/sys/sys/ |
H A D | hash.h | 51 hash = HASHSTEP(hash, *p++); in hash32_buf() 53 return hash; in hash32_buf() 65 hash = HASHSTEP(hash, *p++); in hash32_str() 67 return hash; in hash32_str() 79 hash = HASHSTEP(hash, *p++); in hash32_strn() 81 return hash; in hash32_strn() 95 hash = HASHSTEP(hash, *p++); in hash32_stre() 100 return hash; in hash32_stre() 110 uint32_t hash) in hash32_strne() argument 115 hash = HASHSTEP(hash, *p++); in hash32_strne() [all …]
|
/freebsd/sys/fs/ext2fs/ |
H A D | ext2_hash.c | 118 uint32_t a = hash[0], b = hash[1], c = hash[2], d = hash[3]; in ext2_half_md4() 150 hash[0] += a; in ext2_half_md4() 151 hash[1] += b; in ext2_half_md4() 152 hash[2] += c; in ext2_half_md4() 153 hash[3] += d; in ext2_half_md4() 164 uint32_t x = hash[0], y = hash[1]; in ext2_tea() 175 hash[0] += x; in ext2_tea() 176 hash[1] += y; in ext2_tea() 257 uint32_t hash[4]; in ext2_htree_hash() local 274 memcpy(hash, hash_seed, sizeof(hash)); in ext2_htree_hash() [all …]
|
/freebsd/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/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() 132 struct crypto_hash *hash; in compute_password_element() local 187 hash = eap_pwd_h_init(); in compute_password_element() 188 if (hash == NULL) in compute_password_element() 336 struct crypto_hash *hash; in compute_keys() local 353 hash = eap_pwd_h_init(); in compute_keys() 354 if (hash == NULL) { in compute_keys() 366 hash = eap_pwd_h_init(); in compute_keys() 367 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/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/lib/libpmcstat/ |
H A D | libpmcstat_string.c | 57 int hash, len; in pmcstat_string_intern() local 62 hash = pmcstat_string_compute_hash(s); in pmcstat_string_intern() 68 ps->ps_hash = hash; in pmcstat_string_intern() 90 unsigned hash; in pmcstat_string_compute_hash() local 92 for (hash = 2166136261; *s; s++) in pmcstat_string_compute_hash() 93 hash = (hash ^ *s) * 16777619; in pmcstat_string_compute_hash() 95 return (hash & PMCSTAT_HASH_MASK); in pmcstat_string_compute_hash() 102 int hash, len; in pmcstat_string_lookup() local 104 hash = pmcstat_string_compute_hash(s); in pmcstat_string_lookup() 107 LIST_FOREACH(ps, &pmcstat_string_hash[hash], ps_next) in pmcstat_string_lookup() [all …]
|
/freebsd/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/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() 315 mf->hash[hash_2_value] = pos; in lzma_mf_hc3_find() 355 mf->hash[hash_2_value] = pos; in lzma_mf_hc3_skip() 378 mf->hash[hash_2_value ] = pos; in lzma_mf_hc4_find() 434 mf->hash[hash_2_value] = pos; in lzma_mf_hc4_skip() 595 mf->hash[hash_value] = pos; in lzma_mf_bt2_find() 610 mf->hash[hash_value] = pos; in lzma_mf_bt2_skip() 630 mf->hash[hash_2_value] = pos; in lzma_mf_bt3_find() 664 mf->hash[hash_2_value] = pos; in lzma_mf_bt3_skip() [all …]
|
/freebsd/lib/libc/stdlib/ |
H A D | hsearch_r.c | 45 for (index = hash, i = 0;; index += ++i) { in hsearch_lookup_free() 59 size_t hash; in hsearch_hash() local 61 hash = offset_basis; in hsearch_hash() 63 hash ^= (uint8_t)*str++; in hsearch_hash() 65 hash *= UINT32_C(16777619); in hsearch_hash() 67 hash *= UINT64_C(1099511628211); in hsearch_hash() 69 return (hash); in hsearch_hash() 77 size_t hash, index, i, old_hash, old_count, new_count; in hsearch_r() local 80 hash = hsearch_hash(hsearch->offset_basis, item.key); in hsearch_r() 86 for (index = hash, i = 0;; index += ++i) { in hsearch_r() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/IR/ |
H A D | StructuralHash.cpp | 36 hash(hash_combine(V)); in hashArbitaryType() 40 hash(ValueType->getTypeID()); in hashType() 42 hash(ValueType->getIntegerBitWidth()); in hashType() 58 hash(Arg->getArgNo()); in updateOperand() 68 hash(Inst.getOpcode()); in updateInstruction() 105 hash(0x62642d6b6b2d6b72); // Function header in update() 107 hash(F.isVarArg()); in update() 108 hash(F.arg_size()); in update() 124 hash(45798); in update() 140 hash(23456); // Global header in update() [all …]
|
/freebsd/lib/libc/iconv/ |
H A D | 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()
|
/freebsd/sys/kern/ |
H A D | vfs_hash.c | 65 vfs_hash_bucket(const struct mount *mp, u_int hash) in vfs_hash_bucket() argument 81 LIST_FOREACH(vp, vfs_hash_bucket(mp, hash), v_hashlist) { in vfs_hash_get() 82 if (vp->v_hash != hash) in vfs_hash_get() 95 if (vp->v_hash != hash || in vfs_hash_get() 120 LIST_FOREACH(vp, vfs_hash_bucket(mp, hash), v_hashlist) { in vfs_hash_ref() 121 if (vp->v_hash != hash) in vfs_hash_ref() 163 vfs_hash_bucket(vp->v_mount, hash), v_hashlist) { in vfs_hash_insert() 164 if (vp2->v_hash != hash) in vfs_hash_insert() 187 vp->v_hash = hash; in vfs_hash_insert() 194 vfs_hash_rehash(struct vnode *vp, u_int hash) in vfs_hash_rehash() argument [all …]
|
/freebsd/sys/contrib/openzfs/module/os/linux/spl/ |
H A D | spl-tsd.c | 103 ulong_t hash; in tsd_hash_search() local 106 bin = &table->ht_bins[hash]; in tsd_hash_search() 160 ulong_t hash; in tsd_hash_add() local 189 bin = &table->ht_bins[hash]; in tsd_hash_add() 219 ulong_t hash; in tsd_hash_add_key() local 255 bin = &table->ht_bins[hash]; in tsd_hash_add_key() 280 ulong_t hash; in tsd_hash_add_pid() local 345 for (hash = 0; hash < size; hash++) { in tsd_hash_table_init() 407 ulong_t hash; in tsd_remove_entry() local 594 ulong_t hash; in tsd_destroy() local [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/crypto/ |
H A D | img-hash.txt | 1 Imagination Technologies hardware hash accelerator 3 The hash accelerator provides hardware hashing acceleration for 8 - compatible : "img,hash-accelerator" 14 - clock-names : "sys" Used to clock the hash block registers 15 "hash" Used to clock data through the accelerator 19 hash: hash@18149600 { 20 compatible = "img,hash-accelerator"; 26 clock-names = "sys", "hash";
|
/freebsd/sys/dev/drm2/ttm/ |
H A D | ttm_object.c | 111 struct drm_hash_item hash; member 165 &base->hash, in ttm_base_object_init() 228 struct drm_hash_item *hash; in ttm_base_object_lookup() local 235 base = drm_hash_entry(hash, struct ttm_base_object, hash); in ttm_base_object_lookup() 261 struct drm_hash_item *hash; in ttm_ref_object_add() local 270 ret = drm_ht_find_item(ht, base->hash.key, &hash); in ttm_ref_object_add() 273 ref = drm_hash_entry(hash, struct ttm_ref_object, hash); in ttm_ref_object_add() 290 ref->hash.key = base->hash.key; in ttm_ref_object_add() 344 struct drm_hash_item *hash; in ttm_ref_object_base_unref() local 348 ret = drm_ht_find_item(ht, key, &hash); in ttm_ref_object_base_unref() [all …]
|
/freebsd/crypto/openssl/crypto/lhash/ |
H A D | lhash.c | 109 unsigned long hash; in OPENSSL_LH_insert() local 126 nn->hash = hash; in OPENSSL_LH_insert() 139 unsigned long hash; in OPENSSL_LH_delete() local 165 unsigned long hash; in OPENSSL_LH_retrieve() local 217 unsigned long hash; in expand() local 244 hash = np->hash; in expand() 294 unsigned long hash, nn; in getrn() local 297 hash = (*(lh->hash)) (data); in getrn() 298 *rhash = hash; in getrn() 300 nn = hash % lh->pmax; in getrn() [all …]
|
/freebsd/usr.sbin/certctl/ |
H A D | certctl.sh | 84 echo "$hash" 101 while [ -e "$checkdir/$hash.$decimal" ] ; do 131 suffix=$(get_decimal "$CERTDESTDIR" "$hash") 132 verbose "Adding $hash.$suffix to trust store" 134 "$(realpath "$1")" "$CERTDESTDIR/$hash.$suffix" 147 suffix=$(get_decimal "$UNTRUSTDESTDIR" "$hash") 148 filename="$hash.$suffix" 149 echo "$srcfile" "$hash.$suffix" 153 suffix=$(get_decimal "$UNTRUSTDESTDIR" "$hash") 154 filename="$hash.$suffix" [all …]
|
/freebsd/contrib/libdiff/lib/ |
H A D | diff_atomize_text.c | 33 diff_atom_hash_update(unsigned int hash, unsigned char atom_byte) in diff_atom_hash_update() argument 35 return hash * 23 + atom_byte; in diff_atom_hash_update() 58 unsigned int hash = 0; in diff_data_atomize_text_lines_fd() local 73 hash = diff_atom_hash_update( in diff_data_atomize_text_lines_fd() 74 hash, buf[i]); in diff_data_atomize_text_lines_fd() 109 .hash = hash, in diff_data_atomize_text_lines_fd() 141 unsigned int hash = 0; in diff_data_atomize_text_lines_mmap() local 146 hash = diff_atom_hash_update(hash, *line_end); in diff_data_atomize_text_lines_mmap() 170 .hash = hash, in diff_data_atomize_text_lines_mmap()
|
/freebsd/contrib/lib9p/ |
H A D | hashtable.c | 74 ht_find(struct ht *h, uint32_t hash) in ht_find() argument 79 result = ht_find_locked(h, hash); in ht_find() 85 ht_find_locked(struct ht *h, uint32_t hash) in ht_find_locked() argument 93 if (item->hti_hash == hash) in ht_find_locked() 110 if (item->hti_hash == hash) { in ht_add() 118 item->hti_hash = hash; in ht_add() 127 ht_remove(struct ht *h, uint32_t hash) in ht_remove() argument 132 result = ht_remove_locked(h, hash); in ht_remove() 138 ht_remove_locked(struct ht *h, uint32_t hash) in ht_remove_locked() argument 142 ssize_t slot = hash % h->ht_nentries; in ht_remove_locked() [all …]
|
/freebsd/contrib/llvm-project/libcxx/include/ext/ |
H A D | __hash | 23 struct _LIBCPP_TEMPLATE_VIS hash {}; 26 struct _LIBCPP_TEMPLATE_VIS hash<const char*> : public std::__unary_function<const char*, size_t> { 33 struct _LIBCPP_TEMPLATE_VIS hash<char*> : public std::__unary_function<char*, size_t> { 40 struct _LIBCPP_TEMPLATE_VIS hash<char> : public std::__unary_function<char, size_t> { 45 struct _LIBCPP_TEMPLATE_VIS hash<signed char> : public std::__unary_function<signed char, size_t> { 50 struct _LIBCPP_TEMPLATE_VIS hash<unsigned char> : public std::__unary_function<unsigned char, size_… 55 struct _LIBCPP_TEMPLATE_VIS hash<short> : public std::__unary_function<short, size_t> { 65 struct _LIBCPP_TEMPLATE_VIS hash<int> : public std::__unary_function<int, size_t> { 70 struct _LIBCPP_TEMPLATE_VIS hash<unsigned int> : public std::__unary_function<unsigned int, size_t>… 75 struct _LIBCPP_TEMPLATE_VIS hash<long> : public std::__unary_function<long, size_t> { [all …]
|
/freebsd/sys/netinet/ |
H A D | in_rss.c | 115 uint32_t hash; in rss_proto_software_hash_v4() local 123 hash = rss_hash_ip4_4tuple(s, sp, d, dp); in rss_proto_software_hash_v4() 124 *hashval = hash; in rss_proto_software_hash_v4() 130 *hashval = hash; in rss_proto_software_hash_v4() 135 hash = rss_hash_ip4_2tuple(s, d); in rss_proto_software_hash_v4() 136 *hashval = hash; in rss_proto_software_hash_v4() 161 uint32_t hash; in xps_proto_software_hash_v4() local 171 return (hash); in xps_proto_software_hash_v4() 176 return (hash); in xps_proto_software_hash_v4() 179 hash = rss_hash_ip4_2tuple(d, s); in xps_proto_software_hash_v4() [all …]
|