/qemu/crypto/ |
A D | hash.c | 86 QCryptoHashDriver *drv = hash->driver; in qcrypto_hash_updatev() 91 int qcrypto_hash_update(QCryptoHash *hash, in qcrypto_hash_update() argument 103 QCryptoHash *hash = NULL; in qcrypto_hash_new() local 113 if (hash) { in qcrypto_hash_new() 115 return hash; in qcrypto_hash_new() 120 if (!hash) { in qcrypto_hash_new() 125 return hash; in qcrypto_hash_new() 128 void qcrypto_hash_free(QCryptoHash *hash) in qcrypto_hash_free() argument 132 if (hash) { in qcrypto_hash_free() 133 drv = hash->driver; in qcrypto_hash_free() [all …]
|
A D | hash-gcrypt.c | 54 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() 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() 77 gcry_md_hd_t *ctx = hash->opaque; in qcrypto_gcrypt_hash_free() 84 g_free(hash); in qcrypto_gcrypt_hash_free() 94 gcry_md_hd_t *ctx = hash->opaque; in qcrypto_gcrypt_hash_update() [all …]
|
A D | hash-gnutls.c | 59 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() 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() 82 gnutls_hash_hd_t *ctx = hash->opaque; in qcrypto_gnutls_hash_free() 86 g_free(hash); in qcrypto_gnutls_hash_free() 97 gnutls_hash_hd_t *ctx = hash->opaque; in qcrypto_gnutls_hash_update() [all …]
|
A D | hash-glib.c | 51 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() 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 77 GChecksum *ctx = hash->opaque; in qcrypto_glib_hash_update() [all …]
|
A D | hash-nettle.c | 124 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() 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 149 union qcrypto_hash_ctx *ctx = hash->opaque; in qcrypto_nettle_hash_update() [all …]
|
A D | hash-afalg.c | 122 QCryptoHash *hash; in qcrypto_afalg_hash_new() local 131 hash = g_new(QCryptoHash, 1); in qcrypto_afalg_hash_new() 132 hash->alg = alg; in qcrypto_afalg_hash_new() 134 if (!hash->opaque) { in qcrypto_afalg_hash_new() 135 free(hash); in qcrypto_afalg_hash_new() 139 return hash; in qcrypto_afalg_hash_new() 143 void qcrypto_afalg_hash_free(QCryptoHash *hash) in qcrypto_afalg_hash_free() argument 145 QCryptoAFAlgo *ctx = hash->opaque; in qcrypto_afalg_hash_free() 151 g_free(hash); in qcrypto_afalg_hash_free() 220 int qcrypto_afalg_hash_update(QCryptoHash *hash, in qcrypto_afalg_hash_update() argument [all …]
|
A D | pbkdf-gcrypt.c | 26 bool qcrypto_pbkdf2_supports(QCryptoHashAlgo hash) in qcrypto_pbkdf2_supports() argument 28 switch (hash) { in qcrypto_pbkdf2_supports() 39 return qcrypto_hash_supports(hash); in qcrypto_pbkdf2_supports() 45 int qcrypto_pbkdf2(QCryptoHashAlgo hash, in qcrypto_pbkdf2() argument 73 if (hash >= G_N_ELEMENTS(hash_map) || in qcrypto_pbkdf2() 74 hash_map[hash] == GCRY_MD_NONE) { in qcrypto_pbkdf2() 77 QCryptoHashAlgo_str(hash)); in qcrypto_pbkdf2() 82 hash_map[hash], in qcrypto_pbkdf2()
|
A D | pbkdf-gnutls.c | 26 bool qcrypto_pbkdf2_supports(QCryptoHashAlgo hash) in qcrypto_pbkdf2_supports() argument 28 switch (hash) { in qcrypto_pbkdf2_supports() 36 return qcrypto_hash_supports(hash); in qcrypto_pbkdf2_supports() 42 int qcrypto_pbkdf2(QCryptoHashAlgo hash, in qcrypto_pbkdf2() argument 69 if (hash >= G_N_ELEMENTS(hash_map) || in qcrypto_pbkdf2() 70 hash_map[hash] == GNUTLS_DIG_UNKNOWN) { in qcrypto_pbkdf2() 73 QCryptoHashAlgo_str(hash)); in qcrypto_pbkdf2() 77 ret = gnutls_pbkdf2(hash_map[hash], in qcrypto_pbkdf2()
|
A D | afsplit.c | 43 static int qcrypto_afsplit_hash(QCryptoHashAlgo hash, in qcrypto_afsplit_hash() argument 48 size_t digestlen = qcrypto_hash_digest_len(hash); in qcrypto_afsplit_hash() 71 if (qcrypto_hash_bytesv(hash, in qcrypto_afsplit_hash() 88 int qcrypto_afsplit_encode(QCryptoHashAlgo hash, in qcrypto_afsplit_encode() argument 107 if (qcrypto_afsplit_hash(hash, blocklen, block, in qcrypto_afsplit_encode() 120 int qcrypto_afsplit_decode(QCryptoHashAlgo hash, in qcrypto_afsplit_decode() argument 135 if (qcrypto_afsplit_hash(hash, blocklen, block, in qcrypto_afsplit_decode()
|
A D | meson.build | 10 'hash.c', 32 crypto_ss.add(nettle, files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c')) 40 crypto_ss.add(gcrypt, files('hash-gcrypt.c', 'hmac-gcrypt.c', 'pbkdf-gcrypt.c')) 42 crypto_ss.add(gnutls, files('hash-gnutls.c', 'hmac-gnutls.c', 'pbkdf-gnutls.c')) 44 crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c')) 51 crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
|
A D | pbkdf.c | 90 QCryptoHashAlgo hash; member 103 QCryptoHashAlgo hash = iters_data->hash; in threaded_qcrypto_pbkdf2_count_iters() local 120 if (qcrypto_pbkdf2(hash, in threaded_qcrypto_pbkdf2_count_iters() 156 uint64_t qcrypto_pbkdf2_count_iters(QCryptoHashAlgo hash, in qcrypto_pbkdf2_count_iters() argument 163 hash, key, nkey, salt, nsalt, nout, 0, errp in qcrypto_pbkdf2_count_iters()
|
A D | pbkdf-nettle.c | 28 bool qcrypto_pbkdf2_supports(QCryptoHashAlgo hash) in qcrypto_pbkdf2_supports() argument 30 switch (hash) { in qcrypto_pbkdf2_supports() 46 int qcrypto_pbkdf2(QCryptoHashAlgo hash, in qcrypto_pbkdf2() argument 73 switch (hash) { in qcrypto_pbkdf2() 126 QCryptoHashAlgo_str(hash)); in qcrypto_pbkdf2()
|
/qemu/tests/unit/ |
A D | test-crypto-pbkdf.c | 34 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 …]
|
A D | test-qht.c | 29 uint32_t hash; in insert() local 34 hash = i; in insert() 36 inserted = qht_insert(&ht, &arr[i], hash, NULL); in insert() 49 uint32_t hash; in do_rm() local 51 hash = arr[i]; in do_rm() 53 g_assert_true(qht_remove(&ht, &arr[i], hash)); in do_rm() 55 g_assert_false(qht_remove(&ht, &arr[i], hash)); in do_rm() 78 uint32_t hash; in check() local 82 hash = i; in check() 85 p = qht_lookup(&ht, &val, hash); in check() [all …]
|
A D | test-crypto-afsplit.c | 29 QCryptoHashAlgo hash; member 39 .hash = QCRYPTO_HASH_ALGO_SHA256, 71 .hash = QCRYPTO_HASH_ALGO_SHA256, 80 .hash = QCRYPTO_HASH_ALGO_SHA1, 91 .hash = QCRYPTO_HASH_ALGO_SHA256, 139 qcrypto_afsplit_encode(data->hash, in test_afsplit() 144 qcrypto_afsplit_decode(data->hash, in test_afsplit() 161 qcrypto_afsplit_decode(data->hash, in test_afsplit() 188 if (!qcrypto_hash_supports(test_data[i].hash)) { in main()
|
/qemu/ui/ |
A D | vnc-palette.c | 33 uint32_t color, unsigned int hash) in palette_find() argument 37 QLIST_FOREACH(entry, &palette->table[hash], next) { in palette_find() 78 unsigned int hash; in palette_put() local 82 hash = palette_hash(color, palette->bpp) % VNC_PALETTE_HASH_SIZE; in palette_put() 83 entry = palette_find(palette, color, hash); in palette_put() 92 QLIST_INSERT_HEAD(&palette->table[hash], entry, next); in palette_put() 101 unsigned int hash; in palette_idx() local 103 hash = palette_hash(color, palette->bpp) % VNC_PALETTE_HASH_SIZE; in palette_idx() 104 entry = palette_find(palette, color, hash); in palette_idx()
|
/qemu/docs/devel/ |
A D | ebpf_rss.rst | 16 of rx virtqueue based on lookup table built according to calculated symmetric hash 25 queue_index = indirection_table[hash(<packet data>)%<indirection_table size>] 28 Not for all packets, the hash can/should be calculated. 30 Note: currently, eBPF RSS does not support hash reporting. 36 tap,vhost=off & virtio-net-pci,rss=on,hash=off 40 tap,vhost=on & virtio-net-pci,rss=on,hash=off 44 tap,vhost=off & virtio-net-pci,rss=on,hash=on 46 - eBPF is used, hash population feature is not reported to the guest: 48 tap,vhost=on & virtio-net-pci,rss=on,hash=on 86 - populate_hash - for now, not used. eBPF RSS doesn't support hash reporting. [all …]
|
/qemu/util/ |
A D | qht.c | 389 b = qht_map_to_bucket(map, hash); in qht_bucket_lock__no_stale() 401 b = qht_map_to_bucket(map, hash); in qht_bucket_lock__no_stale() 591 ret = qht_do_lookup(b, func, userp, hash); in qht_lookup__slowpath() 605 b = qht_map_to_bucket(map, hash); in qht_lookup_custom() 608 ret = qht_do_lookup(b, func, userp, hash); in qht_lookup_custom() 640 if (unlikely(b->hashes[i] == hash && in qht_insert__locked() 668 qatomic_set(&b->hashes[i], hash); in qht_insert__locked() 705 b = qht_bucket_lock__no_stale(ht, hash, &map); in qht_insert() 816 b = qht_bucket_lock__no_stale(ht, hash, &map); in qht_remove() 817 ret = qht_remove__locked(b, p, hash); in qht_remove() [all …]
|
A D | qsp.c | 270 uint32_t hash; in qsp_callsite_find() local 272 hash = qsp_callsite_hash(orig); in qsp_callsite_find() 298 qht_insert(ht, e, hash, &existing); in qsp_entry_create() 311 e = qht_lookup(ht, entry, hash); in qsp_entry_find() 332 uint32_t hash; in qsp_entry_get() local 339 hash = qsp_entry_hash(&orig); in qsp_entry_get() 533 uint32_t hash; in qsp_aggregate() local 536 agg = qsp_entry_find(ht, e, hash); in qsp_aggregate() 551 new = qht_lookup(ht, old, hash); in qsp_iter_diff() 580 uint32_t hash; in qsp_iter_callsite_coalesce() local [all …]
|
A D | path.c | 14 static GHashTable *hash; variable 31 hash = g_hash_table_new(g_str_hash, g_str_equal); in init_paths() 49 if (g_hash_table_lookup_extended(hash, name, &key, &value)) { in path() 58 g_hash_table_insert(hash, save, full); in path() 63 g_hash_table_insert(hash, save, NULL); in path()
|
/qemu/include/crypto/ |
A D | hash.h | 166 int qcrypto_hash_updatev(QCryptoHash *hash, 182 int qcrypto_hash_update(QCryptoHash *hash, 202 int qcrypto_hash_finalize_digest(QCryptoHash *hash, 220 int qcrypto_hash_finalize_base64(QCryptoHash *hash, 247 int qcrypto_hash_finalize_bytes(QCryptoHash *hash, 270 void qcrypto_hash_free(QCryptoHash *hash);
|
/qemu/tests/qemu-iotests/ |
A D | 207.out | 43 …"options": {"driver": "ssh", "location": {"host-key-check": {"hash": "wrong", "mode": "hash", "typ… 49 …"options": {"driver": "ssh", "location": {"host-key-check": {"hash": "HASH", "mode": "hash", "type… 60 …"options": {"driver": "ssh", "location": {"host-key-check": {"hash": "wrong", "mode": "hash", "typ… 66 …"options": {"driver": "ssh", "location": {"host-key-check": {"hash": "HASH", "mode": "hash", "type… 77 …"options": {"driver": "ssh", "location": {"host-key-check": {"hash": "wrong", "mode": "hash", "typ… 83 …"options": {"driver": "ssh", "location": {"host-key-check": {"hash": "HASH", "mode": "hash", "type…
|
/qemu/tests/functional/qemu_test/ |
A D | asset.py | 29 self.hash = hashsum 41 self.url, self.hash, self.cache_file) 44 if self.hash is None: 46 if len(self.hash) == 64: 48 elif len(self.hash) == 128: 61 return self.hash == hl.hexdigest() 137 self.hash.encode('utf8')) 145 (self.url, self.hash))
|
/qemu/tests/bench/ |
A D | qht-bench.c | 163 uint32_t hash; in do_rw() local 170 hash = hfunc(*p); in do_rw() 171 read = qht_lookup(&ht, p, hash); in do_rw() 179 hash = hfunc(*p); in do_rw() 183 if (qht_lookup(&ht, p, hash) == NULL) { in do_rw() 184 written = qht_insert(&ht, p, hash, NULL); in do_rw() 194 if (qht_lookup(&ht, p, hash)) { in do_rw() 195 removed = qht_remove(&ht, p, hash); in do_rw() 354 uint32_t hash; in htable_init() local 359 hash = hfunc(*p); in htable_init() [all …]
|
/qemu/include/qemu/ |
A D | qht.h | 88 bool qht_insert(struct qht *ht, void *p, uint32_t hash, void **existing); 107 void *qht_lookup_custom(const struct qht *ht, const void *userp, uint32_t hash, 118 void *qht_lookup(const struct qht *ht, const void *userp, uint32_t hash); 136 bool qht_remove(struct qht *ht, const void *p, uint32_t hash);
|