Home
last modified time | relevance | path

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

12345678910>>...113

/netbsd-src/crypto/external/bsd/netpgp/dist/src/libdigest/
H A Ddigest.c188 digest_init(digest_t *hash, const uint32_t hashalg) in digest_init() argument
190 if (hash == NULL) { in digest_init()
193 switch(hash->alg = hashalg) { in digest_init()
195 MD5Init(&hash->u.md5ctx); in digest_init()
196 hash->size = 16; in digest_init()
197 hash->prefix = prefix_md5; in digest_init()
198 hash->len = sizeof(prefix_md5); in digest_init()
199 hash->ctx = &hash->u.md5ctx; in digest_init()
202 SHA1Init(&hash->u.sha1ctx); in digest_init()
203 hash->size = 20; in digest_init()
[all …]
/netbsd-src/crypto/external/bsd/netpgp/dist/src/netpgpverify/
H A Ddigest.c104 digest_init(digest_t *hash, const uint32_t hashalg) in digest_init() argument
106 if (hash == NULL) { in digest_init()
109 switch(hash->alg = hashalg) { in digest_init()
111 netpgpv_MD5Init(&hash->u.md5ctx); in digest_init()
112 hash->size = 16; in digest_init()
113 hash->prefix = prefix_md5; in digest_init()
114 hash->len = sizeof(prefix_md5); in digest_init()
115 hash->ctx = &hash->u.md5ctx; in digest_init()
118 netpgpv_SHA1Init(&hash->u.sha1ctx); in digest_init()
119 hash->size = 20; in digest_init()
[all …]
/netbsd-src/crypto/external/cpl/trousers/dist/src/tspi/
H A Dobj_hash.c29 struct tr_hash_obj *hash = calloc(1, sizeof(struct tr_hash_obj)); in obj_hash_add() local
31 if (hash == NULL) { in obj_hash_add()
39 hash->type = TSS_HASH_SHA1; in obj_hash_add()
40 hash->hashSize = 20; in obj_hash_add()
42 hash->type = TSS_HASH_OTHER; in obj_hash_add()
43 hash->hashSize = 0; in obj_hash_add()
46 if ((result = obj_list_add(&hash_list, tspContext, 0, hash, phObject))) { in obj_hash_add()
47 free(hash); in obj_hash_add()
86 struct tr_hash_obj *hash; in obj_hash_set_value() local
92 hash = (struct tr_hash_obj *)obj->data; in obj_hash_set_value()
[all …]
/netbsd-src/external/cddl/osnet/dist/tools/ctf/cvt/
H A Dhash.c48 struct hash { struct
100 hash_t *hash; in hash_new() local
102 hash = xmalloc(sizeof (hash_t)); in hash_new()
103 hash->h_buckets = xcalloc(sizeof (list_t *) * nbuckets); in hash_new()
104 hash->h_nbuckets = nbuckets; in hash_new()
105 hash->h_hashfn = hashfn ? hashfn : hash_def_hash; in hash_new()
106 hash->h_cmp = cmp ? cmp : hash_def_cmp; in hash_new()
108 return (hash); in hash_new()
112 hash_add(hash_t *hash, void *key) in hash_add() argument
114 int bucket = hash->h_hashfn(hash->h_nbuckets, key); in hash_add()
[all …]
/netbsd-src/crypto/external/bsd/openssl/dist/providers/implementations/rands/
H A Ddrbg_hash.c73 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->ctx; in add_hash_to_v()
[all …]
/netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/libsupc++/
H A Dhash_bytes.cc77 size_t hash = seed ^ len; in _Hash_bytes() local
87 hash *= m; in _Hash_bytes()
88 hash ^= k; in _Hash_bytes()
97 hash ^= static_cast<unsigned char>(buf[2]) << 16; in _Hash_bytes()
100 hash ^= static_cast<unsigned char>(buf[1]) << 8; in _Hash_bytes()
103 hash ^= static_cast<unsigned char>(buf[0]); in _Hash_bytes()
104 hash *= m; in _Hash_bytes()
108 hash ^= hash >> 13; in _Hash_bytes()
109 hash *= m; in _Hash_bytes()
110 hash ^= hash >> 15; in _Hash_bytes()
[all …]
/netbsd-src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/
H A Dhash_bytes.cc77 size_t hash = seed ^ len; in _Hash_bytes() local
87 hash *= m; in _Hash_bytes()
88 hash ^= k; in _Hash_bytes()
97 hash ^= static_cast<unsigned char>(buf[2]) << 16; in _Hash_bytes()
100 hash ^= static_cast<unsigned char>(buf[1]) << 8; in _Hash_bytes()
103 hash ^= static_cast<unsigned char>(buf[0]); in _Hash_bytes()
104 hash *= m; in _Hash_bytes()
108 hash ^= hash >> 13; in _Hash_bytes()
109 hash *= m; in _Hash_bytes()
110 hash ^= hash >> 15; in _Hash_bytes()
[all …]
/netbsd-src/external/bsd/openldap/dist/contrib/slapd-modules/passwd/
H A Dapr1-ltoa.pl10 ($user, $hash) = split(/:/, $_);
11 unless ($hash =~ /^{APR1}/) {
16 chomp $hash;
17 $hash = decode_base64(substr($hash, 6));
18 ($hash, $salt) = (substr($hash, 0, 16), substr($hash, 16));
19 $hash = $hash;
20 …$hash =~ s/(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)/$1$7$13$2$8$14$3$9$15$4$10$16$5$11$6\0…
21 $hash = encode_base64($hash);
22 chomp $hash;
23 $hash =~ s/(.)(.)(.)(.)/$4$3$2$1/gs;
[all …]
H A Dapr1-atol.pl10 ($user, $hash) = split(/:/, $_);
11 unless ($hash =~ /^\$apr1\$/) {
16 chomp $hash;
17 ($_,$_,$salt,$hash) = split(/\$/, $hash);
19 $hash =~ tr|./0-9A-Za-z|A-Za-z0-9+/|;
20 $hash .= "AA";
21 $hash =~ s/(.)(.)(.)(.)/$4$3$2$1/gs;
22 $hash = decode_base64($hash);
23 …$hash =~ s/(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)..(.)/$1$4$7$10$13$15$2$5$8$11$14$16$3$6$9…
24 $hash .= $salt;
[all …]
/netbsd-src/crypto/external/bsd/netpgp/dist/src/lib/
H A Dsignature.c94 pgp_hash_t hash; member
156 rsa_sign(pgp_hash_t *hash, in rsa_sign() argument
172 if (strcmp(hash->name, "SHA1") == 0) { in rsa_sign()
205 if ((t = hash->finish(hash, &hashbuf[n])) != expected) { in rsa_sign()
206 (void) fprintf(stderr, "rsa_sign: short %s hash\n", hash->name); in rsa_sign()
226 dsa_sign(pgp_hash_t *hash, in dsa_sign() argument
244 t = hash->finish(hash, &hashbuf[0]); in dsa_sign()
269 ecdsa_sign(pgp_hash_t *hash, in ecdsa_sign() argument
286 t = hash->finish(hash, &hashbuf[0]); in ecdsa_sign()
320 const uint8_t *hash, in rsa_verify() argument
[all …]
H A Dopenssl_crypto.c337 md5_init(pgp_hash_t *hash) in md5_init() argument
339 if (hash->data) { in md5_init()
342 if ((hash->data = calloc(1, sizeof(MD5_CTX))) == NULL) { in md5_init()
346 MD5_Init(hash->data); in md5_init()
351 md5_add(pgp_hash_t *hash, const uint8_t *data, unsigned length) in md5_add() argument
353 MD5_Update(hash->data, data, length); in md5_add()
357 md5_finish(pgp_hash_t *hash, uint8_t *out) in md5_finish() argument
359 MD5_Final(out, hash->data); in md5_finish()
360 free(hash->data); in md5_finish()
361 hash->data = NULL; in md5_finish()
[all …]
H A Dmisc.c423 hash_uint32(pgp_hash_t *hash, uint32_t n) in hash_uint32() argument
431 (*hash->add)(hash, (const uint8_t *)(void *)ibuf, (unsigned)sizeof(ibuf)); in hash_uint32()
437 hash_string(pgp_hash_t *hash, const uint8_t *buf, uint32_t len) in hash_string() argument
442 hash_uint32(hash, len); in hash_string()
443 (*hash->add)(hash, buf, len); in hash_string()
449 hash_bignum(pgp_hash_t *hash, BIGNUM *bignum) in hash_bignum() argument
456 hash_uint32(hash, 0); in hash_bignum()
470 hash_string(hash, bn + 1 - padbyte, (unsigned)(len + padbyte)); in hash_bignum()
488 pgp_hash_t hash; in pgp_fingerprint() local
501 pgp_hash_md5(&hash); in pgp_fingerprint()
[all …]
/netbsd-src/usr.bin/cksum/
H A Dcksum.c112 const struct hash { struct
148 static int hash_digest_file(char *, const struct hash *, int);
162 const struct hash *hash; in main() local
177 for (hash = hashes; hash->hashname != NULL; hash++) in main()
178 if (strcmp(progname, hash->progname) == 0) in main()
181 if (hash->hashname == NULL) { in main()
182 hash = NULL; in main()
196 if (hash) { in main()
203 hash = &hashes[i]; in main()
208 if (hash == NULL) { in main()
[all …]
/netbsd-src/sys/net/agr/
H A Dif_agrether_hash.c76 uint32_t hash = HASH32_BUF_INIT; in agrether_hashmbuf() local
83 return hash; in agrether_hashmbuf()
86 hash = HASH(&eh->ether_dhost, sizeof(eh->ether_dhost), hash); in agrether_hashmbuf()
87 hash = HASH(&eh->ether_shost, sizeof(eh->ether_shost), hash); in agrether_hashmbuf()
97 return hash; in agrether_hashmbuf()
108 hash = HASH(&tci, sizeof(tci), hash); in agrether_hashmbuf()
117 return hash; in agrether_hashmbuf()
120 hash = HASH(&ip->ip_src, sizeof(ip->ip_src), hash); in agrether_hashmbuf()
121 hash = HASH(&ip->ip_dst, sizeof(ip->ip_dst), hash); in agrether_hashmbuf()
122 hash = HASH(&ip->ip_p, sizeof(ip->ip_p), hash); in agrether_hashmbuf()
[all …]
/netbsd-src/crypto/external/bsd/heimdal/dist/lib/hcrypto/
H A Dmdtest.c114 unsigned char hash[64]; member
239 hash_test (struct hash_foo *hash, struct test *tests) in hash_test() argument
244 void *ctx = malloc(hash->psize); in hash_test()
245 unsigned char *res = malloc(hash->hsize); in hash_test()
247 printf ("%s... ", hash->name); in hash_test()
252 if (hash->evp() == NULL) { in hash_test()
256 EVP_DigestInit_ex(ectx, hash->evp(), NULL); in hash_test()
258 (*hash->init)(ctx); in hash_test()
263 (*hash->update)(ctx, buf, sizeof(buf)); in hash_test()
267 (*hash->update)(ctx, (unsigned char *)t->str, strlen(t->str)); in hash_test()
[all …]
/netbsd-src/sys/coda/
H A Dcoda_namecache.c117 kauth_cred_t cred, int hash);
167 kauth_cred_t cred, int hash) in coda_nc_find() argument
178 dcp, name, namelen, cred, hash));) in coda_nc_find()
180 LIST_FOREACH(cncp, &coda_nc_hash[hash].head, hash) in coda_nc_find()
220 int hash; in coda_nc_enter() local
236 hash = CODA_NC_HASH(name, namelen, dcp); in coda_nc_enter()
237 cncp = coda_nc_find(dcp, name, namelen, cred, hash); in coda_nc_enter()
256 LIST_REMOVE(cncp, hash); in coda_nc_enter()
277 LIST_INSERT_HEAD(&coda_nc_hash[hash].head, cncp, hash); in coda_nc_enter()
278 coda_nc_hash[hash].length++; /* Used for tuning */ in coda_nc_enter()
[all …]
/netbsd-src/external/gpl3/binutils.old/dist/bfd/doc/
H A Dhash.texi3 BFD provides a simple set of hash table functions. Routines
4 are provided to initialize a hash table, to free a hash table,
5 to look up a string in a hash table and optionally create an
6 entry for it, and to traverse a hash table. There is
7 currently no routine to delete an string from a hash table.
9 The basic hash table does not permit any data to be stored
10 with a string. However, a hash table is designed to present a
11 base class from which other types of hash tables may be
14 rather than simply providing a data pointer in a hash table
16 ends. The linker may create thousands of hash table entries,
[all …]
/netbsd-src/sys/sys/
H A Dhash.h52 hash32_buf(const void *bf, size_t len, uint32_t hash) in hash32_buf() argument
57 hash = hash * 257 + *s++; in hash32_buf()
58 return (hash * 257); in hash32_buf()
73 hash32_str(const void *bf, uint32_t hash) in hash32_str() argument
79 hash = hash * 33 + c; /* "perl": k=33, r=r+r/32 */ in hash32_str()
80 return (hash + (hash >> 5)); in hash32_str()
91 hash32_strn(const void *bf, size_t len, uint32_t hash) in hash32_strn() argument
97 hash = hash * 33 + c; /* "perl": k=33, r=r+r/32 */ in hash32_strn()
98 return (hash + (hash >> 5)); in hash32_strn()
/netbsd-src/sys/ufs/ext2fs/
H A Dext2fs_hash.c176 ext2fs_half_md4(uint32_t hash[4], uint32_t data[8]) in ext2fs_half_md4()
178 uint32_t a = hash[0], b = hash[1], c = hash[2], d = hash[3]; in ext2fs_half_md4()
210 hash[0] += a; in ext2fs_half_md4()
211 hash[1] += b; in ext2fs_half_md4()
212 hash[2] += c; in ext2fs_half_md4()
213 hash[3] += d; in ext2fs_half_md4()
220 ext2fs_tea(uint32_t hash[4], uint32_t data[8]) in ext2fs_tea()
224 uint32_t x = hash[0], y = hash[1]; in ext2fs_tea()
235 hash[0] += x; in ext2fs_tea()
236 hash[1] += y; in ext2fs_tea()
[all …]
/netbsd-src/external/gpl3/binutils/dist/bfd/doc/
H A Dhash.texi3 BFD provides a simple set of hash table functions. Routines
4 are provided to initialize a hash table, to free a hash table,
5 to look up a string in a hash table and optionally create an
6 entry for it, and to traverse a hash table. There is
7 currently no routine to delete an string from a hash table.
9 The basic hash table does not permit any data to be stored
10 with a string. However, a hash table is designed to present a
11 base class from which other types of hash tables may be
14 rather than simply providing a data pointer in a hash table
16 ends. The linker may create thousands of hash table entries,
[all …]
/netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/include/bits/
H A Dfunctional_hash.h58 struct hash; in _GLIBCXX_VISIBILITY()
71 struct __poison_hash<_Tp, __void_t<decltype(hash<_Tp>()(declval<_Tp>()))>> in _GLIBCXX_VISIBILITY()
94 return hash<__type>{}(static_cast<__type>(__val)); in _GLIBCXX_VISIBILITY()
101 struct hash : __hash_enum<_Tp> in _GLIBCXX_VISIBILITY()
106 struct hash<_Tp*> : public __hash_base<size_t, _Tp*> in _GLIBCXX_VISIBILITY()
116 struct hash<_Tp> : public __hash_base<size_t, _Tp> \ in _GLIBCXX_VISIBILITY()
195 hash(const void* __ptr, size_t __clength, in _GLIBCXX_VISIBILITY()
201 hash(const _Tp& __val) in _GLIBCXX_VISIBILITY()
202 { return hash(&__val, sizeof(__val)); } in _GLIBCXX_VISIBILITY()
207 { return hash(&__val, sizeof(__val), __hash); } in _GLIBCXX_VISIBILITY()
[all …]
/netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/include/tr1/
H A Dfunctional_hash.h45 struct hash : public std::unary_function<_Tp, size_t> in _GLIBCXX_VISIBILITY() struct
53 struct hash<_Tp*> : public std::unary_function<_Tp*, size_t> in _GLIBCXX_VISIBILITY()
64 hash<_Tp>::operator()(_Tp __val) const \ in _GLIBCXX_VISIBILITY()
96 hash(const _Tp* __ptr, size_t __clength) in _GLIBCXX_VISIBILITY()
111 hash(const _Tp* __ptr, size_t __clength) in _GLIBCXX_VISIBILITY()
129 hash(const _Tp* __ptr, size_t __clength) in _GLIBCXX_VISIBILITY()
146 using _Fnv_hash_base<sizeof(size_t)>::hash; in _GLIBCXX_VISIBILITY()
150 hash(const _Tp& __val) in _GLIBCXX_VISIBILITY()
151 { return hash(&__val, sizeof(__val)); } in _GLIBCXX_VISIBILITY()
157 hash<float>::operator()(float __val) const in _GLIBCXX_VISIBILITY()
[all …]
/netbsd-src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/
H A Dfunctional_hash.h59 struct hash; in _GLIBCXX_VISIBILITY()
72 struct __poison_hash<_Tp, __void_t<decltype(hash<_Tp>()(declval<_Tp>()))>> in _GLIBCXX_VISIBILITY()
95 return hash<__type>{}(static_cast<__type>(__val)); in _GLIBCXX_VISIBILITY()
102 struct hash : __hash_enum<_Tp> in _GLIBCXX_VISIBILITY()
107 struct hash<_Tp*> : public __hash_base<size_t, _Tp*> in _GLIBCXX_VISIBILITY()
117 struct hash<_Tp> : public __hash_base<size_t, _Tp> \ in _GLIBCXX_VISIBILITY()
204 hash(const void* __ptr, size_t __clength, in _GLIBCXX_VISIBILITY()
210 hash(const _Tp& __val) in _GLIBCXX_VISIBILITY()
211 { return hash(&__val, sizeof(__val)); } in _GLIBCXX_VISIBILITY()
216 { return hash(&__val, sizeof(__val), __hash); } in _GLIBCXX_VISIBILITY()
[all …]
/netbsd-src/external/gpl3/gcc/dist/libstdc++-v3/include/tr1/
H A Dfunctional_hash.h49 struct hash : public std::unary_function<_Tp, size_t> in _GLIBCXX_VISIBILITY() struct
57 struct hash<_Tp*> : public std::unary_function<_Tp*, size_t> in _GLIBCXX_VISIBILITY()
69 hash<_Tp>::operator()(_Tp __val) const \ in _GLIBCXX_VISIBILITY()
101 hash(const _Tp* __ptr, size_t __clength) in _GLIBCXX_VISIBILITY()
116 hash(const _Tp* __ptr, size_t __clength) in _GLIBCXX_VISIBILITY()
134 hash(const _Tp* __ptr, size_t __clength) in _GLIBCXX_VISIBILITY()
151 using _Fnv_hash_base<sizeof(size_t)>::hash; in _GLIBCXX_VISIBILITY()
155 hash(const _Tp& __val) in _GLIBCXX_VISIBILITY()
156 { return hash(&__val, sizeof(__val)); } in _GLIBCXX_VISIBILITY()
162 hash<float>::operator()(float __val) const in _GLIBCXX_VISIBILITY()
[all …]
/netbsd-src/sys/external/bsd/drm2/dist/drm/vboxvideo/
H A Dvbox_hgsmi.c17 static u32 hgsmi_hash_process(u32 hash, const u8 *data, int size) in hgsmi_hash_process() argument
20 hash += *data++; in hgsmi_hash_process()
21 hash += (hash << 10); in hgsmi_hash_process()
22 hash ^= (hash >> 6); in hgsmi_hash_process()
25 return hash; in hgsmi_hash_process()
28 static u32 hgsmi_hash_end(u32 hash) in hgsmi_hash_end() argument
30 hash += (hash << 3); in hgsmi_hash_end()
31 hash ^= (hash >> 11); in hgsmi_hash_end()
32 hash += (hash << 15); in hgsmi_hash_end()
34 return hash; in hgsmi_hash_end()

12345678910>>...113