/freebsd/sys/libkern/ |
H A D | murmur3_32.c | 46 uint32_t hash, k; in murmur3_32_hash() local 52 hash = seed; in murmur3_32_hash() 63 hash ^= k; in murmur3_32_hash() 64 hash = rol32(hash, 13); in murmur3_32_hash() 65 hash *= 5; in murmur3_32_hash() 66 hash += 0xe6546b64; in murmur3_32_hash() 83 hash ^= k; in murmur3_32_hash() 89 hash ^= (uint32_t)len; in murmur3_32_hash() 90 hash ^= hash >> 16; in murmur3_32_hash() 91 hash *= 0x85ebca6b; in murmur3_32_hash() [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 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 …]
|
/freebsd/crypto/openssl/providers/implementations/rands/ |
H A D | drbg_hash.c | 73 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; in hash_df() local 74 EVP_MD_CTX *ctx = hash->ctx; in hash_df() 75 unsigned char *vtmp = hash->vtmp; in hash_df() 103 if (!(EVP_DigestInit_ex(ctx, ossl_prov_digest_md(&hash->digest), NULL) in hash_df() 110 if (outlen < hash->blocklen) { in hash_df() 114 OPENSSL_cleanse(vtmp, hash->blocklen); in hash_df() 120 outlen -= hash->blocklen; in hash_df() 125 out += hash->blocklen; in hash_df() 178 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; in add_hash_to_v() local 179 EVP_MD_CTX *ctx = hash in add_hash_to_v() 209 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; hash_gen() local 253 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; drbg_hash_instantiate() local 292 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; drbg_hash_reseed() local 327 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; drbg_hash_generate() local 364 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; drbg_hash_uninstantiate() local 380 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; drbg_hash_verify_zeroization() local 390 PROV_DRBG_HASH *hash; drbg_hash_new() local 421 PROV_DRBG_HASH *hash; drbg_hash_free() local 434 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; drbg_hash_get_ctx_params() local 462 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)ctx->data; drbg_hash_set_ctx_params() local [all...] |
/freebsd/sys/sys/ |
H A D | hash.h | 46 hash32_buf(const void *buf, size_t len, uint32_t hash) in hash32_buf() argument 51 hash = HASHSTEP(hash, *p++); in hash32_buf() 53 return hash; in hash32_buf() 60 hash32_str(const void *buf, uint32_t hash) in hash32_str() argument 65 hash = HASHSTEP(hash, *p++); in hash32_str() 67 return hash; in hash32_str() 74 hash32_strn(const void *buf, size_t len, uint32_t hash) in hash32_strn() argument 79 hash = HASHSTEP(hash, *p++); in hash32_strn() 81 return hash; in hash32_strn() 90 hash32_stre(const void *buf, int end, const char **ep, uint32_t hash) in hash32_stre() argument [all …]
|
/freebsd/crypto/libecc/include/libecc/ |
H A D | meson.build | 82 'hash/bash.h', 83 'hash/bash512.h', 84 'hash/sha3-224.h', 85 'hash/ripemd160.h', 86 'hash/sha512-224.h', 87 'hash/sha3-256.h', 88 'hash/bash384.h', 89 'hash/hmac.h', 90 'hash/sm3.h', 91 'hash/streebog256.h', [all …]
|
/freebsd/sys/fs/ext2fs/ |
H A D | ext2_hash.c | 75 SDT_PROBE_DEFINE2(ext2fs, , trace, hash, "int", "char*"); 116 ext2_half_md4(uint32_t hash[4], uint32_t data[8]) in ext2_half_md4() 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() 160 ext2_tea(uint32_t hash[4], uint32_t data[8]) in ext2_tea() 164 uint32_t x = hash[0], y = hash[1]; in ext2_tea() 175 hash[0] += x; in ext2_tea() [all …]
|
/freebsd/contrib/wpa/src/eap_common/ |
H A D | eap_pwd_common.c | 31 void eap_pwd_h_update(struct crypto_hash *hash, const u8 *data, size_t len) in eap_pwd_h_update() argument 33 crypto_hash_update(hash, data, len); in eap_pwd_h_update() 37 void eap_pwd_h_final(struct crypto_hash *hash, u8 *digest) in eap_pwd_h_final() argument 40 crypto_hash_finish(hash, digest, &len); in eap_pwd_h_final() 48 struct crypto_hash *hash; in eap_pwd_kdf() local 59 hash = crypto_hash_init(CRYPTO_HASH_ALG_HMAC_SHA256, in eap_pwd_kdf() 61 if (hash == NULL) in eap_pwd_kdf() 64 crypto_hash_update(hash, digest, SHA256_MAC_LEN); in eap_pwd_kdf() 65 crypto_hash_update(hash, (u8 *) &i, sizeof(u16)); in eap_pwd_kdf() 66 crypto_hash_update(hash, label, labellen); in eap_pwd_kdf() [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/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/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() 70 LIST_INSERT_HEAD(&pmcstat_string_hash[hash], ps, ps_next); 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() [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 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 …]
|
/freebsd/lib/libc/stdlib/ |
H A D | hsearch_r.c | 41 hsearch_lookup_free(struct __hsearch *hsearch, size_t hash) in hsearch_lookup_free() argument 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() [all …]
|
/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 68 return (&vfs_hash_tbl[(hash + mp->mnt_hashseed) & vfs_hash_mask]); in vfs_hash_bucket() 72 vfs_hash_get(const struct mount *mp, u_int hash, int flags, struct thread *td, in vfs_hash_get() 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() 113 vfs_hash_ref(const struct mount *mp, u_int hash, struct thread *td, in vfs_hash_ref() argument 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() 152 vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, in vfs_hash_insert() 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 105 hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits); in tsd_hash_search() 106 bin = &table->ht_bins[hash]; in tsd_hash_search() 160 ulong_t hash; in tsd_hash_add() local 188 hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits); in tsd_hash_add() 189 bin = &table->ht_bins[hash]; in tsd_hash_add() 219 ulong_t hash; in tsd_hash_add_key() local 254 hash = hash_long((ulong_t)*keyp * (ulong_t)DTOR_PID, table->ht_bits); in tsd_hash_add_key() 255 bin = &table->ht_bins[hash]; in tsd_hash_add_key() 280 ulong_t hash; in tsd_hash_add_pid() local [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/crypto/openssl/crypto/lhash/ |
H A D | lhash.c | 62 ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h); in OPENSSL_LH_new() 109 unsigned long hash; in OPENSSL_LH_insert() local 117 rn = getrn(lh, data, &hash); in OPENSSL_LH_insert() 126 nn->hash = hash; in OPENSSL_LH_insert() 139 unsigned long hash; in OPENSSL_LH_delete() local 144 rn = getrn(lh, data, &hash); in OPENSSL_LH_delete() 165 unsigned long hash; in OPENSSL_LH_retrieve() local 171 rn = getrn(lh, data, &hash); in OPENSSL_LH_retrieve() 217 unsigned long hash; in expand() local 244 hash = np->hash; in expand() [all …]
|
/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() 180 (void)drm_ht_remove_item(&tdev->object_hash, &base->hash); in ttm_base_object_init() 190 (void)drm_ht_remove_item(&tdev->object_hash, &base->hash); in ttm_release_base() 228 struct drm_hash_item *hash; in ttm_base_object_lookup() local 232 ret = drm_ht_find_item(&tdev->object_hash, key, &hash); in ttm_base_object_lookup() 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() [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/usr.sbin/certctl/ |
H A D | certctl.sh | 81 local hash 83 if hash=$(openssl x509 -noout -subject_hash -in "$1") ; then 84 echo "$hash" 95 local checkdir hash decimal 98 hash=$2 101 while [ -e "$checkdir/$hash.$decimal" ] ; do 111 local hash certhash otherfile otherhash 115 hash=$(do_hash "$1") || return 117 for otherfile in $(find $UNTRUSTDESTDIR -name "$hash.*") ; do 120 info "Skipping untrusted certificate $hash ( [all...] |
/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 90 entry = &h->ht_entries[hash % h->ht_nentries]; in ht_find_locked() 93 if (item->hti_hash == hash) in ht_find_locked() 101 ht_add(struct ht *h, uint32_t hash, void *value) in ht_add() argument 107 entry = &h->ht_entries[hash % h->ht_nentries]; in ht_add() 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 [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_t> { 55 struct _LIBCPP_TEMPLATE_VIS hash<short> : public std::__unary_function<short, size_t> { 60 struct _LIBCPP_TEMPLATE_VIS hash<unsigned short> : public std::__unary_function<unsigned short, size_t> { 65 struct _LIBCPP_TEMPLATE_VIS hash<int> : public std::__unary_function<int, size_t> { 70 struct _LIBCPP_TEMPLATE_VIS hash<unsigne [all...] |
/freebsd/contrib/libdiff/lib/ |
H A D | diff_atomize_text.c | 35 diff_atom_hash_update(unsigned int hash, unsigned char atom_byte) in diff_atom_hash_update() argument 37 return hash * 23 + atom_byte; in diff_atom_hash_update() 60 unsigned int hash = 0; in diff_data_atomize_text_lines_fd() local 75 hash = diff_atom_hash_update( in diff_data_atomize_text_lines_fd() 76 hash, buf[i]); in diff_data_atomize_text_lines_fd() 111 .hash = hash, in diff_data_atomize_text_lines_fd() 165 unsigned int hash = 0; in diff_data_atomize_text_lines_mmap() local 170 hash = diff_atom_hash_update(hash, *line_end); in diff_data_atomize_text_lines_mmap() 194 .hash = hash, in diff_data_atomize_text_lines_mmap()
|
/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() 129 hash = rss_hash_ip4_4tuple(s, sp, d, dp); 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 169 hash = rss_hash_ip4_4tuple(d, dp, s, sp); in xps_proto_software_hash_v4() 171 return (hash); in xps_proto_software_hash_v4() [all …]
|
/freebsd/crypto/libecc/src/wycheproof_tests/ |
H A D | libecc_wycheproof_tests.h | 34 .hash = SHA224, 60 .hash = SHA224, 86 .hash = SHA224, 112 .hash = SHA224, 138 .hash = SHA224, 164 .hash = SHA224, 190 .hash = SHA224, 216 .hash = SHA224, 242 .hash = SHA224, 268 .hash = SHA224, [all …]
|