/third_party/python/Lib/test/ |
H A D | test_hash.py | 2 # iff a==b then hash(a)==hash(b) 4 # Also test that hash implementations are inherited as expected 54 # the hash values are not all the same. 55 hashed = list(map(hash, objlist)) 82 # The hash function for bytes-like objects shouldn't have 89 self.assertEqual(hash(aligned), hash(unaligned)) 129 self.assertEqual(hash(obj), _default_hash(obj)) 133 self.assertEqual(hash(ob 328 return 'import datetime; print(hash(%s))' % repr_ global() namespace [all...] |
/kernel/linux/linux-5.10/drivers/crypto/caam/ |
H A D | key_gen.h | 11 * @hash: Hashing algorithm selection, one of OP_ALG_ALGSEL_* - MD5, SHA1, 16 static inline u32 split_key_len(u32 hash) in split_key_len() argument 22 idx = (hash & OP_ALG_ALGSEL_SUBMASK) >> OP_ALG_ALGSEL_SHIFT; in split_key_len() 29 * @hash: Hashing algorithm selection, one of OP_ALG_ALGSEL_* - MD5, SHA1, 34 static inline u32 split_key_pad_len(u32 hash) in split_key_pad_len() argument 36 return ALIGN(split_key_len(hash), 16); in split_key_pad_len()
|
/kernel/linux/linux-6.6/drivers/crypto/caam/ |
H A D | key_gen.h | 11 * @hash: Hashing algorithm selection, one of OP_ALG_ALGSEL_* - MD5, SHA1, 16 static inline u32 split_key_len(u32 hash) in split_key_len() argument 22 idx = (hash & OP_ALG_ALGSEL_SUBMASK) >> OP_ALG_ALGSEL_SHIFT; in split_key_len() 29 * @hash: Hashing algorithm selection, one of OP_ALG_ALGSEL_* - MD5, SHA1, 34 static inline u32 split_key_pad_len(u32 hash) in split_key_pad_len() argument 36 return ALIGN(split_key_len(hash), 16); in split_key_pad_len()
|
/third_party/node/test/fixtures/crypto/ |
H A D | rsa_pkcs.js | 107 hash: 'SHA-1', 115 hash: 'SHA-256', 123 hash: 'SHA-384', 131 hash: 'SHA-512',
|
/third_party/protobuf/csharp/src/Google.Protobuf/Collections/ |
H A D | Lists.cs | 39 /// Utility to compare if two Lists are the same, and the hash code 73 /// Gets the list's hash code. 81 int hash = 31; in GetHashCode() 84 hash = hash * 29 + element.GetHashCode(); in GetHashCode() 86 return hash; in GetHashCode()
|
/kernel/linux/linux-5.10/drivers/crypto/allwinner/sun4i-ss/ |
H A D | sun4i-ss-hash.c | 3 * sun4i-ss-hash.c - hardware cryptographic accelerator for Allwinner A20 SoC 27 algt = container_of(alg, struct sun4i_ss_alg_template, alg.hash); in sun4i_hash_crainit() 56 algt = container_of(alg, struct sun4i_ss_alg_template, alg.hash); in sun4i_hash_init() 74 octx->hash[i] = op->hash[i]; in sun4i_hash_export_md5() 76 octx->hash[0] = SHA1_H0; in sun4i_hash_export_md5() 77 octx->hash[1] = SHA1_H1; in sun4i_hash_export_md5() 78 octx->hash[2] = SHA1_H2; in sun4i_hash_export_md5() 79 octx->hash[3] = SHA1_H3; in sun4i_hash_export_md5() 99 op->hash[ in sun4i_hash_import_md5() [all...] |
/third_party/node/src/crypto/ |
H A D | crypto_hash.cc | 108 Hash* hash = new Hash(env, args.This()); in New() local 109 if (md == nullptr || !hash->HashInit(md, xof_md_len)) { in New() 115 0 >= EVP_MD_CTX_copy(hash->mdctx_.get(), orig->mdctx_.get())) { in New() 130 // hashSize option was passed for a non-XOF hash function. in HashInit() 148 Decode<Hash>(args, [](Hash* hash, const FunctionCallbackInfo<Value>& args, in HashUpdate() 153 bool r = hash->HashUpdate(data, size); in HashUpdate() 161 Hash* hash; in HashDigest() local 162 ASSIGN_OR_RETURN_UNWRAP(&hash, args.Holder()); in HashDigest() 169 unsigned int len = hash->md_len_; in HashDigest() 173 // causes hash in HashDigest() [all...] |
/third_party/node/test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/ |
H A D | pbkdf2.js | 26 // Test each combination of password size, salt size, hash function, 37 return subtle.deriveBits({name: "PBKDF2", salt: salts[saltSize], hash: hashName, iterations: parseInt(iterations)}, baseKeys[passwordSize], 256) 56 return subtle.deriveKey({name: "PBKDF2", salt: salts[saltSize], hash: hashName, iterations: parseInt(iterations)}, baseKeys[passwordSize], derivedKeyType.algorithm, true, derivedKeyType.usages) 73 // - illegal name for hash algorithm (NotSupportedError) 76 return subtle.deriveKey({name: "PBKDF2", salt: salts[saltSize], hash: badHash, iterations: parseInt(iterations)}, baseKeys[passwordSize], derivedKeyType.algorithm, true, derivedKeyType.usages) 78 assert_unreached("bad hash name should have thrown an NotSupportedError"); 80 assert_equals(err.name, "NotSupportedError", "deriveKey with bad hash name correctly threw NotSupportedError: " + err.message); 82 }, testName + " with bad hash name " + badHash); 86 return subtle.deriveKey({name: "PBKDF2", salt: salts[saltSize], hash: hashName, iterations: parseInt(iterations)}, noKey[passwordSize], derivedKeyType.algorithm, true, derivedKeyType.usages) 96 return subtle.deriveKey({name: "PBKDF2", salt: salts[saltSize], hash [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/tls/ |
H A D | pkcs5.c | 439 u8 hash[SHA1_MAC_LEN]; in pkcs12_key_gen() local 447 if (sha1_vector(2, addr, len, hash) < 0) in pkcs12_key_gen() 450 addr[0] = hash; in pkcs12_key_gen() 453 if (sha1_vector(1, addr, len, hash) < 0) in pkcs12_key_gen() 458 os_memcpy(out, hash, out_len); in pkcs12_key_gen() 463 os_memcpy(out, hash, u); in pkcs12_key_gen() 468 /* B = copies of Ai (final hash value) */ in pkcs12_key_gen() 470 B[i] = hash[i % u]; in pkcs12_key_gen() 533 u8 hash[MD5_MAC_LEN]; in pkcs5_crypto_init() local 550 if (md5_vector(2, addr, len, hash) < in pkcs5_crypto_init() [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_server/ |
H A D | eap_server_pwd.c | 314 struct crypto_hash *hash = NULL; in eap_pwd_build_confirm_req() local 342 hash = eap_pwd_h_init(); in eap_pwd_build_confirm_req() 343 if (hash == NULL) in eap_pwd_build_confirm_req() 353 eap_pwd_h_update(hash, cruft, prime_len); in eap_pwd_build_confirm_req() 362 eap_pwd_h_update(hash, cruft, prime_len * 2); in eap_pwd_build_confirm_req() 366 eap_pwd_h_update(hash, cruft, order_len); in eap_pwd_build_confirm_req() 375 eap_pwd_h_update(hash, cruft, prime_len * 2); in eap_pwd_build_confirm_req() 379 eap_pwd_h_update(hash, cruft, order_len); in eap_pwd_build_confirm_req() 391 eap_pwd_h_update(hash, cruft, ptr - cruft); in eap_pwd_build_confirm_req() 394 eap_pwd_h_final(hash, con in eap_pwd_build_confirm_req() 747 struct crypto_hash *hash = NULL; eap_pwd_process_confirm_resp() local [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_server/ |
H A D | eap_server_pwd.c | 314 struct crypto_hash *hash = NULL; in eap_pwd_build_confirm_req() local 342 hash = eap_pwd_h_init(); in eap_pwd_build_confirm_req() 343 if (hash == NULL) in eap_pwd_build_confirm_req() 353 eap_pwd_h_update(hash, cruft, prime_len); in eap_pwd_build_confirm_req() 362 eap_pwd_h_update(hash, cruft, prime_len * 2); in eap_pwd_build_confirm_req() 366 eap_pwd_h_update(hash, cruft, order_len); in eap_pwd_build_confirm_req() 375 eap_pwd_h_update(hash, cruft, prime_len * 2); in eap_pwd_build_confirm_req() 379 eap_pwd_h_update(hash, cruft, order_len); in eap_pwd_build_confirm_req() 391 eap_pwd_h_update(hash, cruft, ptr - cruft); in eap_pwd_build_confirm_req() 394 eap_pwd_h_final(hash, con in eap_pwd_build_confirm_req() 747 struct crypto_hash *hash = NULL; eap_pwd_process_confirm_resp() local [all...] |
/third_party/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/ |
H A D | UnittestWellKnownTypes.cs | 505 int hash = 1; in GetHashCode() 506 if (anyField_ != null) hash ^= AnyField.GetHashCode(); in GetHashCode() 507 if (apiField_ != null) hash ^= ApiField.GetHashCode(); in GetHashCode() 508 if (durationField_ != null) hash ^= DurationField.GetHashCode(); in GetHashCode() 509 if (emptyField_ != null) hash ^= EmptyField.GetHashCode(); in GetHashCode() 510 if (fieldMaskField_ != null) hash ^= FieldMaskField.GetHashCode(); in GetHashCode() 511 if (sourceContextField_ != null) hash ^= SourceContextField.GetHashCode(); in GetHashCode() 512 if (structField_ != null) hash ^= StructField.GetHashCode(); in GetHashCode() 513 if (timestampField_ != null) hash ^= TimestampField.GetHashCode(); in GetHashCode() 514 if (typeField_ != null) hash in GetHashCode() [all...] |
H A D | UnittestProto3.cs | 959 int hash = 1; in GetHashCode() 960 if (SingleInt32 != 0) hash ^= SingleInt32.GetHashCode(); in GetHashCode() 961 if (SingleInt64 != 0L) hash ^= SingleInt64.GetHashCode(); in GetHashCode() 962 if (SingleUint32 != 0) hash ^= SingleUint32.GetHashCode(); in GetHashCode() 963 if (SingleUint64 != 0UL) hash ^= SingleUint64.GetHashCode(); in GetHashCode() 964 if (SingleSint32 != 0) hash ^= SingleSint32.GetHashCode(); in GetHashCode() 965 if (SingleSint64 != 0L) hash ^= SingleSint64.GetHashCode(); in GetHashCode() 966 if (SingleFixed32 != 0) hash ^= SingleFixed32.GetHashCode(); in GetHashCode() 967 if (SingleFixed64 != 0UL) hash ^= SingleFixed64.GetHashCode(); in GetHashCode() 968 if (SingleSfixed32 != 0) hash in GetHashCode() [all...] |
/kernel/linux/linux-5.10/fs/kernfs/ |
H A D | dir.c | 16 #include <linux/hash.h> 302 * @name: Null terminated string to hash 303 * @ns: Namespace tag to hash 305 * Returns 31 bit hash of ns + name (so it fits in an off_t ) 309 unsigned long hash = init_name_hash(ns); in kernfs_name_hash() local 312 hash = partial_name_hash(*name++, hash); in kernfs_name_hash() 313 hash = end_name_hash(hash); in kernfs_name_hash() 314 hash in kernfs_name_hash() 323 kernfs_name_compare(unsigned int hash, const char *name, const void *ns, const struct kernfs_node *kn) kernfs_name_compare() argument 853 unsigned int hash; kernfs_find_ns() local 1638 kernfs_dir_pos(const void *ns, struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos) kernfs_dir_pos() argument [all...] |
/kernel/linux/linux-6.6/fs/kernfs/ |
H A D | dir.c | 16 #include <linux/hash.h> 306 * kernfs_name_hash - calculate hash of @ns + @name 307 * @name: Null terminated string to hash 308 * @ns: Namespace tag to hash 310 * Return: 31-bit hash of ns + name (so it fits in an off_t) 314 unsigned long hash = init_name_hash(ns); in kernfs_name_hash() local 317 hash = partial_name_hash(*name++, hash); in kernfs_name_hash() 318 hash = end_name_hash(hash); in kernfs_name_hash() 328 kernfs_name_compare(unsigned int hash, const char *name, const void *ns, const struct kernfs_node *kn) kernfs_name_compare() argument 834 unsigned int hash; kernfs_find_ns() local 1783 kernfs_dir_pos(const void *ns, struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos) kernfs_dir_pos() argument [all...] |
/kernel/linux/linux-6.6/net/batman-adv/ |
H A D | network-coding.c | 40 #include "hash.h" 130 * batadv_nc_mesh_init() - initialise coding hash table and start housekeeping 390 * batadv_nc_purge_orig_hash() - traverse entire originator hash to check if 396 struct batadv_hashtable *hash = bat_priv->orig_hash; in batadv_nc_purge_orig_hash() local 401 if (!hash) in batadv_nc_purge_orig_hash() 405 for (i = 0; i < hash->size; i++) { in batadv_nc_purge_orig_hash() 406 head = &hash->table[i]; in batadv_nc_purge_orig_hash() 417 * batadv_nc_purge_paths() - traverse all nc paths part of the hash and remove 420 * @hash: hash tabl 426 batadv_nc_purge_paths(struct batadv_priv *bat_priv, struct batadv_hashtable *hash, bool (*to_purge)(struct batadv_priv *, struct batadv_nc_path *)) batadv_nc_purge_paths() argument 498 u32 hash = 0; batadv_nc_hash_choose() local 540 batadv_nc_hash_find(struct batadv_hashtable *hash, void *data) batadv_nc_hash_find() argument 667 batadv_nc_process_nc_paths(struct batadv_priv *bat_priv, struct batadv_hashtable *hash, bool (*process_fn)(struct batadv_priv *, struct batadv_nc_path *, struct batadv_nc_packet *)) batadv_nc_process_nc_paths() argument 951 batadv_nc_get_path(struct batadv_priv *bat_priv, struct batadv_hashtable *hash, u8 *src, u8 *dst) batadv_nc_get_path() argument 1266 struct batadv_hashtable *hash = bat_priv->nc.coding_hash; batadv_nc_path_search() local 1733 struct batadv_hashtable *hash = bat_priv->nc.decoding_hash; batadv_nc_find_decoding_packet() local [all...] |
/third_party/protobuf/csharp/src/Google.Protobuf.Conformance/ |
H A D | Conformance.cs | 177 int hash = 1; in GetHashCode() 178 hash ^= failure_.GetHashCode(); in GetHashCode() 180 hash ^= _unknownFields.GetHashCode(); in GetHashCode() 182 return hash; in GetHashCode() 506 int hash = 1; in GetHashCode() 507 if (payloadCase_ == PayloadOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode(); in GetHashCode() 508 if (payloadCase_ == PayloadOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode(); in GetHashCode() 509 if (payloadCase_ == PayloadOneofCase.JspbPayload) hash ^= JspbPayload.GetHashCode(); in GetHashCode() 510 if (payloadCase_ == PayloadOneofCase.TextPayload) hash ^= TextPayload.GetHashCode(); in GetHashCode() 511 if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) hash in GetHashCode() [all...] |
/kernel/linux/linux-6.6/arch/mips/cavium-octeon/crypto/ |
H A D | octeon-sha1.c | 24 #include <crypto/internal/hash.h> 34 u64 *hash = (u64 *)sctx->state; in octeon_sha1_store_hash() local 40 write_octeon_64bit_hash_dword(hash[0], 0); in octeon_sha1_store_hash() 41 write_octeon_64bit_hash_dword(hash[1], 1); in octeon_sha1_store_hash() 48 u64 *hash = (u64 *)sctx->state; in octeon_sha1_read_hash() local 54 hash[0] = read_octeon_64bit_hash_dword(0); in octeon_sha1_read_hash() 55 hash[1] = read_octeon_64bit_hash_dword(1); in octeon_sha1_read_hash()
|
/kernel/linux/linux-5.10/scripts/ |
H A D | parse-maintainers.pl | 177 my %hash; 180 file_input(\%hash, $input_file); 183 foreach my $key (keys %hash) { 184 if ($key =~ /$type/ || $hash{$key} =~ /$type/) { 185 $new_hash{$key} = $hash{$key}; 186 delete $hash{$key}; 191 alpha_output(\%hash, $output_file);
|
/kernel/linux/linux-6.6/scripts/ |
H A D | parse-maintainers.pl | 177 my %hash; 180 file_input(\%hash, $input_file); 183 foreach my $key (keys %hash) { 184 if ($key =~ /$type/ || $hash{$key} =~ /$type/) { 185 $new_hash{$key} = $hash{$key}; 186 delete $hash{$key}; 191 alpha_output(\%hash, $output_file);
|
/third_party/icu/icu4c/source/i18n/ |
H A D | sortkey.cpp | 43 // A hash code of kInvalidHashCode indicates that the hash code needs 44 // to be computed. A hash code of kEmptyHashCode is used for empty keys 45 // and for any key whose computed hash code is kInvalidHashCode. 48 // The "bogus hash code" replaces a separate fBogus flag. 249 int32_t hash; in computeHashCode() local 251 hash = kEmptyHashCode; in computeHashCode() 253 hash = ustr_hashCharsN(s, length); in computeHashCode() 254 if (hash == kInvalidHashCode || hash in computeHashCode() [all...] |
/third_party/node/test/parallel/ |
H A D | test-crypto-pbkdf2.js | 9 function runPBKDF2(password, salt, iterations, keylen, hash) { 11 crypto.pbkdf2Sync(password, salt, iterations, keylen, hash); 13 crypto.pbkdf2(password, salt, iterations, keylen, hash, 225 .filter((hash) => !kNotPBKDF2Supported.includes(hash)) 226 .forEach((hash) => { 227 runPBKDF2(new Uint8Array(10), 'salt', 8, 8, hash);
|
/third_party/node/deps/icu-small/source/i18n/ |
H A D | sortkey.cpp | 43 // A hash code of kInvalidHashCode indicates that the hash code needs 44 // to be computed. A hash code of kEmptyHashCode is used for empty keys 45 // and for any key whose computed hash code is kInvalidHashCode. 48 // The "bogus hash code" replaces a separate fBogus flag. 249 int32_t hash; in computeHashCode() local 251 hash = kEmptyHashCode; in computeHashCode() 253 hash = ustr_hashCharsN(s, length); in computeHashCode() 254 if (hash == kInvalidHashCode || hash in computeHashCode() [all...] |
/third_party/node/deps/v8/src/base/ |
H A D | functional.h | 22 // base::hash is an implementation of the hash function object specified by 23 // C++11. It was designed to be compatible with std::hash (in C++11) and 24 // boost:hash (which in turn is based on the hash function object specified by 27 // base::hash is implemented by calling the hash_value function. The namespace 32 // If users are asked to implement a hash function for their own types with no 33 // guidance, they generally write bad hash functions. Instead, we provide a 34 // simple function base::hash_combine to pass hash-relevant member variables 35 // into, in order to define a decent hash functio 141 struct hash { global() struct 168 struct hash<T*> { global() struct [all...] |
/third_party/skia/third_party/externals/icu/source/i18n/ |
H A D | sortkey.cpp | 43 // A hash code of kInvalidHashCode indicates that the hash code needs 44 // to be computed. A hash code of kEmptyHashCode is used for empty keys 45 // and for any key whose computed hash code is kInvalidHashCode. 48 // The "bogus hash code" replaces a separate fBogus flag. 249 int32_t hash; in computeHashCode() local 251 hash = kEmptyHashCode; in computeHashCode() 253 hash = ustr_hashCharsN(s, length); in computeHashCode() 254 if (hash == kInvalidHashCode || hash in computeHashCode() [all...] |