/freebsd/cddl/contrib/opensolaris/tools/ctf/cvt/ |
H A D | hash.c | 30 * Routines for manipulating hash tables 39 #include "hash.h" 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() [all …]
|
/freebsd/sys/libkern/ |
H A D | murmur3_32.c | 27 #include <sys/hash.h> 35 * Simple implementation of the Murmur3-32 hash function. 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() [all …]
|
/freebsd/crypto/openssl/providers/implementations/rands/ |
H A D | drbg_hash.c | 59 * SP800-90Ar1 10.3.1 Derivation function using a Hash Function (Hash_df). 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() 100 * (Step 4.1) out = out || Hash(tmp || in || [in2] || [in3]) 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 in hash_df() 178 PROV_DRBG_HASH *hash = (PROV_DRBG_HASH *)drbg->data; add_hash_to_v() local 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/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | StableHashing.h |
|
/freebsd/contrib/unbound/util/storage/ |
H A D | slabhash.h | 39 * Hash table that consists of smaller hash tables. 52 * Hash table formed from several smaller ones. 64 /** lookup array of hash tables */ 69 * Create new slabbed hash table. 70 * @param numtables: number of hash tables to use, other parameters used to 80 * @return: new hash table or NULL on malloc failure. 88 * Delete hash table. Entries are all deleted. 94 * Clear hash table. Entries are all deleted. 103 * @param table: hash table. 104 * @param hash: hash value. User calculates the hash. [all …]
|
H A D | lruhash.h | 2 * util/storage/lruhash.h - hashtable, hash function, LRU keeping. 41 * The hash table keeps a maximum memory size. Old entries are removed 47 * o the idea is to move every thread through the hash lock quickly, 49 * o User performs hash function. 53 * o lookup hash bin. 54 * o lock hash bin. 55 * o find entry (if failed, unlock hash, unl bin, exit). 59 * o unlock hash bin. 72 * o lookup hash bin. 73 * o lock hash bin. [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/include/isc/ |
H A D | hash.h | 18 /* $Id: hash.h,v 1.12 2009/01/17 23:47:43 tbox Exp $ */ 27 /*! \file isc/hash.h 29 * \brief The hash API 30 * provides an unpredictable hash value for variable length data. 31 * A hash object contains a random vector (which is hidden from clients 32 * of this API) to make the actual hash value unpredictable. 34 * The algorithm used in the API guarantees the probability of hash 36 * in the random vector are unpredictable, the probability of hash 39 * Although the API is generic about the hash keys, it mainly expects 42 * hash values for large inputs. [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/sys/ |
H A D | hash.h | 27 * $OpenBSD: hash.h,v 1.4 2004/05/25 18:37:23 jmc Exp $ 41 * Return a 32-bit hash of the given buffer. The init 42 * value should be 0, or the previous hash value to extend 43 * the previous hash. 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() 57 * Return a 32-bit hash of the given string. 60 hash32_str(const void *buf, uint32_t hash) in hash32_str() argument 65 hash = HASHSTEP(hash, *p++); in hash32_str() [all …]
|
/freebsd/share/man/man9/ |
H A D | hash.9 | 26 .\" $OpenBSD: hash.9,v 1.5 2003/04/17 05:08:39 jmc Exp $ 32 .Nm hash , 47 .Fn hash32_buf "const void *buf" "size_t len" "uint32_t hash" 49 .Fn hash32_str "const void *buf" "uint32_t hash" 51 .Fn hash32_strn "const void *buf" "size_t len" "uint32_t hash" 53 .Fn hash32_stre "const void *buf" "int end" "const char **ep" "uint32_t hash" 55 .Fn hash32_strne "const void *buf" "size_t len" "int end" "const char **ep" "uint32_t hash" 57 .Fn jenkins_hash "const void *buf" "size_t len" "uint32_t hash" 59 .Fn jenkins_hash32 "const uint32_t *buf" "size_t count" "uint32_t hash" 61 .Fn murmur3_32_hash "const void *buf" "size_t len" "uint32_t hash" [all …]
|
H A D | hashinit.9 | 31 .Nd manage kernel hash tables 54 functions allocate space for hash tables of size given by the argument 59 function allocates hash tables that are sized to largest power of two 64 function allocates hash tables that are sized to the largest prime 80 Allocated hash tables are contiguous arrays of 91 function frees the space occupied by the hash table pointed to by argument 100 that allocated the hash table. 124 The largest prime hash value chosen by 130 function returns a pointer to an allocated hash table and sets the 134 hash table. [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
H A D | CachedHashString.h | 11 /// owning and not-owning string types that store their hash in addition to 28 /// A container which contains a StringRef plus a precomputed hash. 32 uint32_t Hash; variable 39 CachedHashStringRef(StringRef S, uint32_t Hash) in CachedHashStringRef() argument 40 : P(S.data()), Size(S.size()), Hash(Hash) { in CachedHashStringRef() 47 uint32_t hash() const { return Hash; } in hash() function 58 assert(!isEqual(S, getEmptyKey()) && "Cannot hash the empty key!"); 59 assert(!isEqual(S, getTombstoneKey()) && "Cannot hash the tombstone key!"); 60 return S.hash(); 64 return LHS.hash() == RHS.hash() && [all …]
|
/freebsd/sys/contrib/openzfs/module/os/linux/spl/ |
H A D | spl-tsd.c | 25 * Thread specific data has implemented using a hash table, this avoids 30 * The majority of the entries in the hash table are for specific tsd 34 * distributed over the hash bins providing neither the pid nor key is zero. 37 * By default the hash table is sized to 512 bins which is expected to 40 * The hash table contains two additional type of entries. They first 41 * type is entry is called a 'key' entry and it is added to the hash during 50 * hash the first time a process set a key. The 'pid' entry is also used 64 #include <linux/hash.h> 92 * tsd_hash_search - searches hash table for tsd_hash_entry 93 * @table: hash table [all …]
|
/freebsd/contrib/libucl/klib/ |
H A D | khash.h | 56 However, my implementation is probably not for large hash tables, because 57 the second hash function is closely tied to the first hash function, 78 * Added Wang's integer hash function (not used by default). This hash 123 Generic hash table library. 252 else { /* hash table size to be changed (shrink or expand); rehash */ \ 286 __ac_set_isdel_true(h->flags, i); /* mark it as deleted in the old hash table */ \ 295 if (h->n_buckets > new_n_buckets) { /* shrink the hash table */ \ 310 if (h->n_occupied >= h->upper_bound) { /* update the hash table */ \ 315 } else if (kh_resize_##name(h, h->n_buckets + 1) < 0) { /* expand the hash table */ \ 368 /* --- BEGIN OF HASH FUNCTIONS --- */ [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/DebugInfo/PDB/Native/ |
H A D | Hash.cpp | 1 //===- Hash.cpp - PDB Hash Functions --------------------------------------===// 9 #include "llvm/DebugInfo/PDB/Native/Hash.h" 19 // Used for name hash table and TPI/IPI hashes. 33 // Maximum of 3 bytes left. Hash a 2 byte word if possible, then hash the in hashStringV1() 42 // hash possible odd byte in hashStringV1() 55 // Used for name hash table. 57 uint32_t Hash = 0xb170a1bf; in hashStringV2() local 65 Hash += Item; in hashStringV2() 66 Hash += (Hash << 10); in hashStringV2() 67 Hash ^= (Hash >> 6); in hashStringV2() [all …]
|
/freebsd/sys/netinet/ |
H A D | in_rss.c | 52 /* for software rss hash support */ 58 * Hash an IPv4 2-tuple. 75 * Hash an IPv4 4-tuple. 102 * The protocol code may wish to do a software hash of the given 103 * tuple. This depends upon the currently configured RSS hash types. 115 uint32_t hash; in rss_proto_software_hash_v4() local 118 * Next, choose the hash type depending upon the protocol in rss_proto_software_hash_v4() 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() [all …]
|
/freebsd/contrib/bearssl/inc/ |
H A D | bearssl_rsa.h | 124 * - When verifying PKCS#1 v1.5 signatures, both variants of the hash 241 * - The encoded OID for the hash function. The provided array must begin 244 * also be `NULL`, in which case the raw hash value should be used 246 * to TLS-1.1, with a 36-byte hash value). 248 * - The hash output length, in bytes. 252 * - An output buffer for the hash value. The caller must still compare 253 * it with the hash of the data over which the signature is computed. 257 * - Hash length MUST be no more than 64 bytes. 273 * \param hash_oid encoded hash algorithm OID (or `NULL`). 274 * \param hash_len expected hash value length (in bytes). [all …]
|
/freebsd/lib/libc/stdlib/ |
H A D | hsearch_r.c | 36 * Look up an unused entry in the hash table for a given hash. For this 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() 53 * Computes an FNV-1a hash of the key. Depending on the pointer size, this 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() [all …]
|
/freebsd/contrib/unbound/validator/ |
H A D | val_secalgo.h | 48 /** Return size of nsec3 hash algorithm, 0 if not supported */ 52 * Hash a single hash call of an NSEC3 hash algorithm. 54 * @param algo: nsec3 hash algorithm. 64 * Calculate the sha256 hash for the data buffer into the result. 72 * Start a hash of type sha384. Allocates structure, then inits it, 74 * @return hash structure. NULL on malloc failure or no support. 79 * Start a hash of type sha512. Allocates structure, then inits it, 81 * @return hash structure. NULL on malloc failure or no support. 86 * Update a hash with more information to add to it. 87 * @param hash: the hash that is updated. [all …]
|
/freebsd/sys/dev/qat/qat_api/common/crypto/sym/include/ |
H A D | lac_sym_qat_hash.h | 8 * @defgroup LacSymQatHash Hash QAT 12 * interfaces for populating qat structures for a hash operation 42 * hash precomputes 45 * This structure contains infomation on the hash precomputes 62 * hash state prefix buffer info 65 * This structure contains infomation on the hash state prefix aad buffer 70 /**< Physical pointer to the hash state prefix buffer */ 72 /**< Virtual pointer to the hash state prefix buffer */ 74 /**< hash state storage size in quad words */ 82 * Init the hash specific part of the content descriptor. [all …]
|
H A D | lac_sym_hash.h | 11 * @defgroup LacHash Hash 15 * API functions of the Hash component 19 * There is a single \ref cpaCySym "Symmetric LAC API" for hash, cipher, 25 * The hash component supports hashing in 3 modes. PLAIN, AUTH and NESTED. 33 * The hash component is responsible for implementing the hash specific 36 * structure. This module has been seperated out into two. The hash QAT module 37 * deals entirely with QAT data structures. The hash module itself has minimal 42 * - \ref LacSymQat "Symmetric QAT": Hash uses the lookup table provided by 43 * this module to validate user input. Hash also uses this module to build 44 * the hash QAT request message, request param structure, populate the [all …]
|
/freebsd/sys/netinet6/ |
H A D | in6_rss.c | 52 /* for software rss hash support */ 59 * Hash an IPv6 2-tuple. 76 * Hash an IPv6 4-tuple. 103 * The protocol code may wish to do a software hash of the given 104 * tuple. This depends upon the currently configured RSS hash types. 116 uint32_t hash; in rss_proto_software_hash_v6() local 119 * Next, choose the hash type depending upon the protocol in rss_proto_software_hash_v6() 124 hash = rss_hash_ip6_4tuple(s, sp, d, dp); in rss_proto_software_hash_v6() 125 *hashval = hash; in rss_proto_software_hash_v6() 130 hash = rss_hash_ip6_4tuple(s, sp, d, dp); in rss_proto_software_hash_v6() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/ |
H A D | TypeHashing.h | 28 /// A locally hashed type represents a straightforward hash code of a serialized 35 hash_code Hash; member 38 /// Given a type, compute its local hash. 63 SHA1 = 0, // standard 20-byte SHA1 hash 64 SHA1_8, // last 8-bytes of standard SHA1 hash 68 /// A globally hashed type represents a hash value that is sufficient to 71 /// TypeIndex that refers to B with a previously-computed global hash for B. As 72 /// this is a recursive algorithm (e.g. the global hash of B also depends on the 73 /// global hashes of the types that B refers to), a global hash can uniquely 75 /// different graph structure. Although the hash itsel 88 std::array<uint8_t, 8> Hash; global() member [all...] |
/freebsd/crypto/openssl/doc/man3/ |
H A D | OPENSSL_LH_COMPFUNC.pod | 17 - dynamic hash table 27 LHASH_OF(TYPE) *lh_TYPE_new(OPENSSL_LH_HASHFUNC hash, OPENSSL_LH_COMPFUNC compare); 71 This library implements type-checked dynamic hash tables. The hash 77 arbitrary data entries, and specifies the 'hash' and 'compare' 78 callbacks to be used in organising the table's entries. The I<hash> 80 an unsigned long hash value for its key field. The hash value is 81 normally truncated to a power of 2, so make sure that your hash 83 takes two arguments (pointers to two hash table entries), and returns 86 If your hash table 87 will contain items of some particular type and the I<hash> and [all …]
|
/freebsd/sys/kern/ |
H A D | vfs_hash.c | 38 static MALLOC_DEFINE(M_VFS_HASH, "vfs_hash", "VFS hash table"); 50 rw_init(&vfs_hash_lock, "vfs hash"); in vfs_hashinit() 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() [all …]
|