Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 1526) sorted by relevance

12345678910>>...62

/openbmc/linux/samples/bpf/
H A Dhash_func01.h11 __u32 hash = initval; in SuperFastHash() local
23 hash += get16bits (data); in SuperFastHash()
24 tmp = (get16bits (data+2) << 11) ^ hash; in SuperFastHash()
25 hash = (hash << 16) ^ tmp; in SuperFastHash()
27 hash += hash >> 11; in SuperFastHash()
32 case 3: hash += get16bits (data); in SuperFastHash()
33 hash ^= hash << 16; in SuperFastHash()
34 hash ^= ((signed char)data[sizeof (__u16)]) << 18; in SuperFastHash()
35 hash += hash >> 11; in SuperFastHash()
37 case 2: hash += get16bits (data); in SuperFastHash()
[all …]
/openbmc/linux/net/batman-adv/
H A Dhash.c15 static void batadv_hash_init(struct batadv_hashtable *hash) in batadv_hash_init() argument
19 for (i = 0; i < hash->size; i++) { in batadv_hash_init()
20 INIT_HLIST_HEAD(&hash->table[i]); in batadv_hash_init()
21 spin_lock_init(&hash->list_locks[i]); in batadv_hash_init()
24 atomic_set(&hash->generation, 0); in batadv_hash_init()
31 void batadv_hash_destroy(struct batadv_hashtable *hash) in batadv_hash_destroy() argument
33 kfree(hash->list_locks); in batadv_hash_destroy()
34 kfree(hash->table); in batadv_hash_destroy()
35 kfree(hash); in batadv_hash_destroy()
46 struct batadv_hashtable *hash; in batadv_hash_new() local
[all …]
H A Dhash.h58 void batadv_hash_set_lock_class(struct batadv_hashtable *hash,
62 void batadv_hash_destroy(struct batadv_hashtable *hash);
75 static inline int batadv_hash_add(struct batadv_hashtable *hash, in batadv_hash_add() argument
87 if (!hash) in batadv_hash_add()
90 index = choose(data, hash->size); in batadv_hash_add()
91 head = &hash->table[index]; in batadv_hash_add()
92 list_lock = &hash->list_locks[index]; in batadv_hash_add()
106 atomic_inc(&hash->generation); in batadv_hash_add()
129 static inline void *batadv_hash_remove(struct batadv_hashtable *hash, in batadv_hash_remove() argument
139 index = choose(data, hash->size); in batadv_hash_remove()
[all …]
/openbmc/linux/net/ceph/crush/
H A Dhash.c29 __u32 hash = crush_hash_seed ^ a; in crush_hash32_rjenkins1() local
33 crush_hashmix(b, x, hash); in crush_hash32_rjenkins1()
34 crush_hashmix(y, a, hash); in crush_hash32_rjenkins1()
35 return hash; in crush_hash32_rjenkins1()
40 __u32 hash = crush_hash_seed ^ a ^ b; in crush_hash32_rjenkins1_2() local
43 crush_hashmix(a, b, hash); in crush_hash32_rjenkins1_2()
44 crush_hashmix(x, a, hash); in crush_hash32_rjenkins1_2()
45 crush_hashmix(b, y, hash); in crush_hash32_rjenkins1_2()
46 return hash; in crush_hash32_rjenkins1_2()
51 __u32 hash = crush_hash_seed ^ a ^ b ^ c; in crush_hash32_rjenkins1_3() local
[all …]
/openbmc/linux/drivers/net/xen-netback/
H A Dhash.c50 spin_lock_irqsave(&vif->hash.cache.lock, flags); in xenvif_add_hash()
54 list_for_each_entry_rcu(entry, &vif->hash.cache.list, link, in xenvif_add_hash()
55 lockdep_is_held(&vif->hash.cache.lock)) { in xenvif_add_hash()
65 new->seq = atomic_inc_return(&vif->hash.cache.seq); in xenvif_add_hash()
66 list_add_rcu(&new->link, &vif->hash.cache.list); in xenvif_add_hash()
68 if (++vif->hash.cache.count > xenvif_hash_cache_size) { in xenvif_add_hash()
70 vif->hash.cache.count--; in xenvif_add_hash()
75 spin_unlock_irqrestore(&vif->hash.cache.lock, flags); in xenvif_add_hash()
86 val = xen_netif_toeplitz_hash(vif->hash.key, in xenvif_new_hash()
87 sizeof(vif->hash.key), in xenvif_new_hash()
[all …]
/openbmc/linux/scripts/
H A Dget_dvb_firmware52 my $hash = "53970ec17a538945a6d8cb608a7b3899";
60 verify("$tmpdir/software/OEM/HE/App/boot/SC_MAIN.MC", $hash);
70 my $hash = "237938d53a7f834c05c42b894ca68ac3";
80 verify("$tmpdir/ZEnglish/sc_main.mc", $hash);
89 my $hash = "2105fd5bf37842fbcdfa4bfd58f3594a";
98 verify("$tmpdir/fwtmp", $hash);
107 my $hash = "6a7e1e2f2644b162ff0502367553c72d";
116 verify("$tmpdir/fwtmp", $hash);
125 my $hash = "1ea24dee4eea8fe971686981f34fd2e0";
134 verify("$tmpdir/fwtmp", $hash);
[all …]
/openbmc/linux/drivers/net/ethernet/freescale/fman/
H A Dfman_mac.h196 static inline void free_hash_table(struct eth_hash_t *hash) in free_hash_table() argument
201 if (hash) { in free_hash_table()
202 if (hash->lsts) { in free_hash_table()
203 for (i = 0; i < hash->size; i++) { in free_hash_table()
205 dequeue_addr_from_hash_entry(&hash->lsts[i]); in free_hash_table()
209 dequeue_addr_from_hash_entry(&hash-> in free_hash_table()
214 kfree(hash->lsts); in free_hash_table()
217 kfree(hash); in free_hash_table()
224 struct eth_hash_t *hash; in alloc_hash_table() local
227 hash = kmalloc(sizeof(*hash), GFP_KERNEL); in alloc_hash_table()
[all …]
/openbmc/linux/include/linux/
H A Drhashtable.h120 unsigned int hash) in rht_bucket_index() argument
122 return hash & (tbl->size - 1); in rht_bucket_index()
129 unsigned int hash; in rht_key_get_hash() local
133 hash = ht->p.hashfn(key, ht->key_len, hash_rnd); in rht_key_get_hash()
138 hash = params.hashfn(key, key_len, hash_rnd); in rht_key_get_hash()
140 hash = jhash(key, key_len, hash_rnd); in rht_key_get_hash()
142 hash = jhash2(key, key_len / sizeof(u32), hash_rnd); in rht_key_get_hash()
147 hash = params.hashfn(key, key_len, hash_rnd); in rht_key_get_hash()
149 hash = jhash(key, key_len, hash_rnd); in rht_key_get_hash()
152 return hash; in rht_key_get_hash()
[all …]
/openbmc/qemu/crypto/
H A Dhash.c81 int qcrypto_hash_updatev(QCryptoHash *hash, in qcrypto_hash_updatev() argument
86 QCryptoHashDriver *drv = hash->driver; in qcrypto_hash_updatev()
88 return drv->hash_update(hash, iov, niov, errp); in qcrypto_hash_updatev()
91 int qcrypto_hash_update(QCryptoHash *hash, in qcrypto_hash_update() argument
98 return qcrypto_hash_updatev(hash, &iov, 1, errp); in qcrypto_hash_update()
103 QCryptoHash *hash = NULL; in qcrypto_hash_new() local
112 hash = qcrypto_hash_afalg_driver.hash_new(alg, NULL); in qcrypto_hash_new()
113 if (hash) { in qcrypto_hash_new()
114 hash->driver = &qcrypto_hash_afalg_driver; in qcrypto_hash_new()
115 return hash; in qcrypto_hash_new()
[all …]
H A Dhash-gcrypt.c54 QCryptoHash *hash; in qcrypto_gcrypt_hash_new() local
57 hash = g_new(QCryptoHash, 1); in qcrypto_gcrypt_hash_new()
58 hash->alg = alg; in qcrypto_gcrypt_hash_new()
59 hash->opaque = g_new(gcry_md_hd_t, 1); in qcrypto_gcrypt_hash_new()
61 ret = gcry_md_open((gcry_md_hd_t *) hash->opaque, in qcrypto_gcrypt_hash_new()
67 g_free(hash->opaque); in qcrypto_gcrypt_hash_new()
68 g_free(hash); in qcrypto_gcrypt_hash_new()
71 return hash; in qcrypto_gcrypt_hash_new()
75 void qcrypto_gcrypt_hash_free(QCryptoHash *hash) in qcrypto_gcrypt_hash_free() argument
77 gcry_md_hd_t *ctx = hash->opaque; in qcrypto_gcrypt_hash_free()
[all …]
H A Dhash-gnutls.c59 QCryptoHash *hash; in qcrypto_gnutls_hash_new() local
62 hash = g_new(QCryptoHash, 1); in qcrypto_gnutls_hash_new()
63 hash->alg = alg; in qcrypto_gnutls_hash_new()
64 hash->opaque = g_new(gnutls_hash_hd_t, 1); in qcrypto_gnutls_hash_new()
66 ret = gnutls_hash_init(hash->opaque, qcrypto_hash_alg_map[alg]); in qcrypto_gnutls_hash_new()
71 g_free(hash->opaque); in qcrypto_gnutls_hash_new()
72 g_free(hash); in qcrypto_gnutls_hash_new()
76 return hash; in qcrypto_gnutls_hash_new()
80 void qcrypto_gnutls_hash_free(QCryptoHash *hash) in qcrypto_gnutls_hash_free() argument
82 gnutls_hash_hd_t *ctx = hash->opaque; in qcrypto_gnutls_hash_free()
[all …]
H A Dhash-glib.c51 QCryptoHash *hash; in qcrypto_glib_hash_new() local
53 hash = g_new(QCryptoHash, 1); in qcrypto_glib_hash_new()
54 hash->alg = alg; in qcrypto_glib_hash_new()
55 hash->opaque = g_checksum_new(qcrypto_hash_alg_map[alg]); in qcrypto_glib_hash_new()
57 return hash; in qcrypto_glib_hash_new()
61 void qcrypto_glib_hash_free(QCryptoHash *hash) in qcrypto_glib_hash_free() argument
63 if (hash->opaque) { in qcrypto_glib_hash_free()
64 g_checksum_free(hash->opaque); in qcrypto_glib_hash_free()
67 g_free(hash); in qcrypto_glib_hash_free()
72 int qcrypto_glib_hash_update(QCryptoHash *hash, in qcrypto_glib_hash_update() argument
[all …]
H A Dhash-nettle.c124 QCryptoHash *hash; in qcrypto_nettle_hash_new() local
126 hash = g_new(QCryptoHash, 1); in qcrypto_nettle_hash_new()
127 hash->alg = alg; in qcrypto_nettle_hash_new()
128 hash->opaque = g_new(union qcrypto_hash_ctx, 1); in qcrypto_nettle_hash_new()
130 qcrypto_hash_alg_map[alg].init(hash->opaque); in qcrypto_nettle_hash_new()
131 return hash; in qcrypto_nettle_hash_new()
135 void qcrypto_nettle_hash_free(QCryptoHash *hash) in qcrypto_nettle_hash_free() argument
137 union qcrypto_hash_ctx *ctx = hash->opaque; in qcrypto_nettle_hash_free()
140 g_free(hash); in qcrypto_nettle_hash_free()
144 int qcrypto_nettle_hash_update(QCryptoHash *hash, in qcrypto_nettle_hash_update() argument
[all …]
/openbmc/linux/lib/
H A Dhashtable_test.c37 DEFINE_HASHTABLE(hash, 1); in hashtable_test_hash_empty()
39 KUNIT_EXPECT_TRUE(test, hash_empty(hash)); in hashtable_test_hash_empty()
43 hash_add(hash, &a.node, a.key); in hashtable_test_hash_empty()
46 KUNIT_EXPECT_FALSE(test, hash_empty(hash)); in hashtable_test_hash_empty()
52 DEFINE_HASHTABLE(hash, 4); in hashtable_test_hash_hashed()
56 hash_add(hash, &a.node, a.key); in hashtable_test_hash_hashed()
59 hash_add(hash, &b.node, b.key); in hashtable_test_hash_hashed()
69 DEFINE_HASHTABLE(hash, 3); in hashtable_test_hash_add()
74 hash_add(hash, &a.node, a.key); in hashtable_test_hash_add()
78 hash_add(hash, &b.node, b.key); in hashtable_test_hash_add()
[all …]
/openbmc/qemu/tests/unit/
H A Dtest-crypto-pbkdf.c34 QCryptoHashAlgo hash; member
55 .hash = QCRYPTO_HASH_ALGO_SHA1,
69 .hash = QCRYPTO_HASH_ALGO_SHA1,
83 .hash = QCRYPTO_HASH_ALGO_SHA1,
97 .hash = QCRYPTO_HASH_ALGO_SHA1,
111 .hash = QCRYPTO_HASH_ALGO_SHA1,
126 .hash = QCRYPTO_HASH_ALGO_SHA1,
141 .hash = QCRYPTO_HASH_ALGO_SHA1,
157 .hash = QCRYPTO_HASH_ALGO_SHA1,
169 .hash = QCRYPTO_HASH_ALGO_SHA1,
[all …]
/openbmc/linux/drivers/gpu/drm/vboxvideo/
H A Dvbox_hgsmi.c12 static u32 hgsmi_hash_process(u32 hash, const u8 *data, int size) in hgsmi_hash_process() argument
15 hash += *data++; in hgsmi_hash_process()
16 hash += (hash << 10); in hgsmi_hash_process()
17 hash ^= (hash >> 6); in hgsmi_hash_process()
20 return hash; in hgsmi_hash_process()
23 static u32 hgsmi_hash_end(u32 hash) in hgsmi_hash_end() argument
25 hash += (hash << 3); in hgsmi_hash_end()
26 hash ^= (hash >> 11); in hgsmi_hash_end()
27 hash += (hash << 15); in hgsmi_hash_end()
29 return hash; in hgsmi_hash_end()
/openbmc/linux/arch/powerpc/crypto/
H A Daes-gcm-p10-glue.c77 static void set_subkey(unsigned char *hash) in set_subkey() argument
79 *(u64 *)&hash[0] = be64_to_cpup((__be64 *)&hash[0]); in set_subkey()
80 *(u64 *)&hash[8] = be64_to_cpup((__be64 *)&hash[8]); in set_subkey()
87 static void set_aad(struct gcm_ctx *gctx, struct Hash_ctx *hash, in set_aad() argument
96 gcm_ghash_p10(nXi, hash->Htable+32, aad, i); in set_aad()
105 gcm_ghash_p10(gctx->aad_hash, hash->Htable+32, nXi, 16); in set_aad()
110 memcpy(hash->Htable, gctx->aad_hash, 16); in set_aad()
114 struct Hash_ctx *hash, u8 *assoc, unsigned int assoclen) in gcmp10_init() argument
118 aes_p10_encrypt(hash->H, hash->H, rdkey); in gcmp10_init()
119 set_subkey(hash->H); in gcmp10_init()
[all …]
/openbmc/linux/arch/loongarch/kernel/
H A Drelocate.c71 static inline __init unsigned long rotate_xor(unsigned long hash, in rotate_xor() argument
75 const typeof(hash) *ptr = PTR_ALIGN(area, sizeof(hash)); in rotate_xor()
78 if (size < diff + sizeof(hash)) in rotate_xor()
79 return hash; in rotate_xor()
81 size = ALIGN_DOWN(size - diff, sizeof(hash)); in rotate_xor()
83 for (i = 0; i < size / sizeof(hash); i++) { in rotate_xor()
85 hash = (hash << ((sizeof(hash) * 8) - 7)) | (hash >> 7); in rotate_xor()
86 hash ^= ptr[i]; in rotate_xor()
89 return hash; in rotate_xor()
94 unsigned long hash = 0; in get_random_boot() local
[all …]
/openbmc/sdbusplus/src/server/
H A Dtransaction.cpp23 details::id = std::hash<details::Transaction>{}(t); in get_id()
37 set_id(std::hash<Transaction>{}(t)); in set_id()
47 size_t hash<sdbusplus::bus_t>::operator()(sdbusplus::bus_t& b) const in operator ()()
50 return std::hash<std::string>{}(name); in operator ()()
53 size_t hash<sdbusplus::message_t>::operator()(sdbusplus::message_t& m) const in operator ()()
62 return std::hash<uint64_t>{}(m.get_reply_cookie()); in operator ()()
66 return std::hash<uint64_t>{}(m.get_cookie()); in operator ()()
70 return std::hash<uint64_t>{}( in operator ()()
77 size_t hash<sdbusplus::server::transaction::Transaction>::operator()( in operator ()()
80 auto hash1 = std::hash<sdbusplus::bus_t>{}(t.bus); in operator ()()
[all …]
/openbmc/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_cmdbuf_res.c47 struct vmwgfx_hash_item hash; member
86 struct vmwgfx_hash_item *hash; in vmw_cmdbuf_res_lookup() local
89 hash_for_each_possible_rcu(man->resources, hash, head, key) { in vmw_cmdbuf_res_lookup()
90 if (hash->key == key) in vmw_cmdbuf_res_lookup()
91 return hlist_entry(hash, struct vmw_cmdbuf_res, hash)->res; in vmw_cmdbuf_res_lookup()
109 hash_del_rcu(&entry->hash.head); in vmw_cmdbuf_res_free()
170 hash_add_rcu(entry->man->resources, &entry->hash.head, in vmw_cmdbuf_res_revert()
171 entry->hash.key); in vmw_cmdbuf_res_revert()
207 cres->hash.key = user_key | (res_type << 24); in vmw_cmdbuf_res_add()
208 hash_add_rcu(man->resources, &cres->hash.head, cres->hash.key); in vmw_cmdbuf_res_add()
[all …]
/openbmc/linux/arch/mips/kernel/
H A Drelocate.c194 static inline __init unsigned long rotate_xor(unsigned long hash, in rotate_xor() argument
197 const typeof(hash) *ptr = PTR_ALIGN(area, sizeof(hash)); in rotate_xor()
201 if (unlikely(size < diff + sizeof(hash))) in rotate_xor()
202 return hash; in rotate_xor()
204 size = ALIGN_DOWN(size - diff, sizeof(hash)); in rotate_xor()
206 for (i = 0; i < size / sizeof(hash); i++) { in rotate_xor()
208 hash = (hash << ((sizeof(hash) * 8) - 7)) | (hash >> 7); in rotate_xor()
209 hash ^= ptr[i]; in rotate_xor()
212 return hash; in rotate_xor()
218 unsigned long hash = 0; in get_random_boot() local
[all …]
/openbmc/linux/crypto/
H A Dhmac.c26 struct crypto_shash *hash; member
51 struct crypto_shash *hash = ctx->hash; in hmac_setkey() local
52 SHASH_DESC_ON_STACK(shash, hash); in hmac_setkey()
58 shash->tfm = hash; in hmac_setkey()
99 desc->tfm = ctx->hash; in hmac_import()
147 struct crypto_shash *hash; in hmac_init_tfm() local
152 hash = crypto_spawn_shash(spawn); in hmac_init_tfm()
153 if (IS_ERR(hash)) in hmac_init_tfm()
154 return PTR_ERR(hash); in hmac_init_tfm()
157 crypto_shash_descsize(hash); in hmac_init_tfm()
[all …]
/openbmc/linux/security/apparmor/
H A Dcrypto.c31 char *hash; in aa_calc_hash() local
37 hash = kzalloc(apparmor_hash_size, GFP_KERNEL); in aa_calc_hash()
38 if (!hash) in aa_calc_hash()
49 error = crypto_shash_final(desc, hash); in aa_calc_hash()
53 return hash; in aa_calc_hash()
56 kfree(hash); in aa_calc_hash()
74 profile->hash = kzalloc(apparmor_hash_size, GFP_KERNEL); in aa_calc_profile_hash()
75 if (!profile->hash) in aa_calc_profile_hash()
89 error = crypto_shash_final(desc, profile->hash); in aa_calc_profile_hash()
96 kfree(profile->hash); in aa_calc_profile_hash()
[all …]
/openbmc/linux/arch/mips/cavium-octeon/crypto/
H A Docteon-md5.c39 u64 *hash = (u64 *)ctx->hash; in octeon_md5_store_hash() local
41 write_octeon_64bit_hash_dword(hash[0], 0); in octeon_md5_store_hash()
42 write_octeon_64bit_hash_dword(hash[1], 1); in octeon_md5_store_hash()
47 u64 *hash = (u64 *)ctx->hash; in octeon_md5_read_hash() local
49 hash[0] = read_octeon_64bit_hash_dword(0); in octeon_md5_read_hash()
50 hash[1] = read_octeon_64bit_hash_dword(1); in octeon_md5_read_hash()
71 mctx->hash[0] = MD5_H0; in octeon_md5_init()
72 mctx->hash[1] = MD5_H1; in octeon_md5_init()
73 mctx->hash[2] = MD5_H2; in octeon_md5_init()
74 mctx->hash[3] = MD5_H3; in octeon_md5_init()
[all …]
/openbmc/openbmc/meta-openembedded/meta-networking/recipes-protocols/freediameter/files/
H A DReplace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch1 Replace murmurhash algorithm with Robert Jenkin's hash algorithm
6 processor, so replace it with Robert Jenkin's hash which has worked
29 + * Robert Jenkin's hash function.
30 + * http://burtleburtle.net/bob/hash/evahash.html
48 - uint32_t hash = len;
59 - /* Mix 4 bytes at a time into the hash */
62 - _HASH_MIX(hash, k, m);
70 - case 3: hash ^= data[2] << 16;
71 - case 2: hash ^= data[1] << 8;
72 - case 1: hash ^= data[0];
[all …]

12345678910>>...62