| /mirbsd/src/gnu/usr.bin/perl/lib/Hash/ |
| D | Util.t | 25 my %hash = (foo => 42, bar => 23, locked => 'yep'); 26 lock_keys(%hash); 27 eval { $hash{baz} = 99; }; 30 is( $hash{bar}, 23 ); 31 ok( !exists $hash{baz} ); 33 delete $hash{bar}; 34 ok( !exists $hash{bar} ); 35 $hash{bar} = 69; 36 is( $hash{bar}, 69 ); 38 eval { () = $hash{i_dont_exist} }; [all …]
|
| D | Util.pm | 78 my($hash, @keys) = @_; 80 Internals::hv_clear_placeholders %$hash; 83 my %original_keys = map { ($_ => 1) } keys %$hash; 91 $hash->{$k} = undef unless exists $hash->{$k}; 93 Internals::SvREADONLY %$hash, 1; 96 delete $hash->{$k} unless $original_keys{$k}; 100 Internals::SvREADONLY %$hash, 1; 107 my($hash) = shift; 109 Internals::SvREADONLY %$hash, 0; 128 my($hash, $key) = @_; [all …]
|
| /mirbsd/src/sbin/isakmpd/ |
| D | hash.c | 41 void hmac_init(struct hash *, unsigned char *, unsigned int); 42 void hmac_final(unsigned char *, struct hash *); 55 static struct hash hashes[] = { 75 struct hash * 97 hmac_init(struct hash *hash, unsigned char *okey, unsigned int len) in hmac_init() argument 105 hash->Init(hash->ctx); in hmac_init() 106 hash->Update(hash->ctx, okey, len); in hmac_init() 107 hash->Final(key, hash->ctx); in hmac_init() 116 hash->Init(hash->ctx); in hmac_init() 117 hash->Update(hash->ctx, key, blocklen); in hmac_init() [all …]
|
| D | prf.c | 50 memcpy(ctx->hash->ctx, ctx->ctx, ctx->hash->ctxsize); in prf_hash_init() 51 memcpy(ctx->hash->ctx2, ctx->ctx2, ctx->hash->ctxsize); in prf_hash_init() 58 ctx->hash->Update(ctx->hash->ctx, data, len); in prf_hash_update() 64 ctx->hash->HMACFinal(digest, ctx->hash); in prf_hash_final() 75 struct hash *hash; in prf_alloc() local 81 hash = hash_get(subtype); in prf_alloc() 82 if (!hash) { in prf_alloc() 108 prfctx->ctx = malloc(hash->ctxsize); in prf_alloc() 111 hash->ctxsize); in prf_alloc() 114 prfctx->ctx2 = malloc(hash->ctxsize); in prf_alloc() [all …]
|
| D | cookie.c | 56 struct hash *hash = hash_get(HASH_SHA1); in cookie_gen() local 60 hash->Init(hash->ctx); in cookie_gen() 62 hash->Update(hash->ctx, (u_int8_t *)name, SA_LEN(name)); in cookie_gen() 64 hash->Update(hash->ctx, (u_int8_t *)name, SA_LEN(name)); in cookie_gen() 66 hash->Update(hash->ctx, exchange->cookies + in cookie_gen() 69 hash->Update(hash->ctx, tmpsecret, COOKIE_SECRET_SIZE); in cookie_gen() 70 hash->Final(hash->digest, hash->ctx); in cookie_gen() 71 memcpy(buf, hash->digest, len); in cookie_gen()
|
| D | nat_traversal.c | 87 struct hash *hash; in nat_t_setup_hashes() local 92 hash = hash_get(HASH_MD5); in nat_t_setup_hashes() 93 if (!hash) { in nat_t_setup_hashes() 99 nat_t_hashsize = hash->hashsize; in nat_t_setup_hashes() 118 hash->Init(hash->ctx); in nat_t_setup_hashes() 119 hash->Update(hash->ctx, in nat_t_setup_hashes() 122 hash->Final(nat_t_hashes[i], hash->ctx); in nat_t_setup_hashes() 144 nat_t_add_vendor_payload(struct message *msg, char *hash) in nat_t_add_vendor_payload() argument 160 memcpy(buf + ISAKMP_VENDOR_ID_OFF, hash, nat_t_hashsize); in nat_t_add_vendor_payload() 235 struct hash *hash; in nat_t_generate_nat_d_hash() local [all …]
|
| /mirbsd/src/gnu/usr.bin/lynx/src/ |
| D | LYHash.c | 23 int hash; in hash_code() local 26 for (p = string, hash = 0; *p; p++) in hash_code() 27 hash = HASH_OF(hash, *p); in hash_code() 29 CTRACE_STYLE((tfp, "hash_code(%s) = %d\n", string, hash)); in hash_code() 30 return hash; in hash_code() 35 int hash; in hash_code_lowercase_on_fly() local 38 for (p = string, hash = 0; *p; p++) in hash_code_lowercase_on_fly() 39 hash = HASH_OF(hash, TOLOWER(*p)); in hash_code_lowercase_on_fly() 41 CTRACE_STYLE((tfp, "hash_code_lc(%s) = %d\n", string, hash)); in hash_code_lowercase_on_fly() 42 return hash; in hash_code_lowercase_on_fly() [all …]
|
| /mirbsd/src/sys/sys/ |
| D | hash.h | 52 hash32_buf(const void *buf, size_t len, uint32_t hash) in hash32_buf() argument 57 hash = HASHSTEP(hash, *p++); in hash32_buf() 59 return hash; in hash32_buf() 66 hash32_str(const void *buf, uint32_t hash) in hash32_str() argument 71 hash = HASHSTEP(hash, *p++); in hash32_str() 73 return hash; in hash32_str() 80 hash32_strn(const void *buf, size_t len, uint32_t hash) in hash32_strn() argument 85 hash = HASHSTEP(hash, *p++); in hash32_strn() 87 return hash; in hash32_strn() 96 hash32_stre(const void *buf, int end, char **ep, uint32_t hash) in hash32_stre() argument [all …]
|
| /mirbsd/src/gnu/usr.bin/perl/ext/threads/shared/t/ |
| D | 0nothread.t | 16 my %hash; 18 sub hash 21 is(keys %hash, 0, "hash empty"); 22 $hash{0} = $val[0]; 23 is(keys %hash,1, "Assign grows hash"); 24 is($hash{0},$val[0],"Value correct"); 25 $hash{2} = $val[2]; 26 is(keys %hash,2, "Assign grows hash"); 27 is($hash{0},$val[0],"Value correct"); 28 is($hash{2},$val[2],"Value correct"); [all …]
|
| D | hv_simple.t | 39 my %hash; 40 share(%hash); 41 $hash{"foo"} = "bar"; 42 ok(2,$hash{"foo"} eq "bar","Check hash get"); 43 threads->create(sub { $hash{"bar"} = "thread1"})->join(); 44 threads->create(sub { ok(3,$hash{"bar"} eq "thread1", "Check thread get and write")})->join(); 46 my $foo = delete($hash{"bar"}); 48 $foo = delete($hash{"bar"}); 51 ok(6, keys %hash == 1, "Check keys"); 52 $hash{"1"} = 1; [all …]
|
| D | blessed.t | 56 $$hobj{'hash'} = bless(&share({}), 'yin'); 63 ok(1, ref($hobj) eq 'foo', "hash blessing does work"); 68 ok(5, ref($$aobj[0]) eq 'yin', "blessed hash in array"); 73 ok(9, ref($$hobj{'hash'}) eq 'yin', "blessed hash in hash"); 74 ok(10, ref($$hobj{'array'}) eq 'yang', "blessed array in hash"); 75 ok(11, ref($$hobj{'scalar'}) eq 'baz', "blessed scalar in hash"); 76 ok(12, ${$$hobj{'scalar'}} eq '3', "blessed scalar in hash contents"); 81 ok(13, ref($hobj) eq 'foo', "hash blessing does work"); 86 ok(17, ref($$aobj[0]) eq 'yin', "blessed hash in array"); 91 ok(21, ref($$hobj{'hash'}) eq 'yin', "blessed hash in hash"); [all …]
|
| /mirbsd/src/gnu/usr.bin/perl/ext/XS/APItest/t/ |
| D | hash.t | 113 my (%hash, %tiehash); 116 @hash{@$keys} = @$keys; 119 &$test_sub (\%hash, $key, $printable, $message, @other); 124 my ($hash, $key, $printable, $message) = @_; 126 ok (exists $hash->{$key}, "hv_exists_ent present$message $printable"); 127 ok (XS::APItest::Hash::exists ($hash, $key), 132 my ($hash, $key, $printable, $message) = @_; 134 ok (!exists $hash->{$key}, "hv_exists_ent absent$message $printable"); 135 ok (!XS::APItest::Hash::exists ($hash, $key), 140 my ($hash, $key, $printable, $message) = @_; [all …]
|
| /mirbsd/src/gnu/usr.bin/binutils/bfd/doc/ |
| D | hash.texi | 3 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 …]
|
| /mirbsd/src/gnu/usr.bin/perl/ext/Storable/t/ |
| D | make_downgrade.pl | 21 my %hash = (perl=>"rules"); 23 lock_hash %hash; 25 uuencode_it (\%hash, "Locked hash"); 27 unlock_hash %hash; 29 lock_keys %hash, 'perl', 'rules'; 30 lock_hash %hash; 32 uuencode_it (\%hash, "Locked hash placeholder"); 34 unlock_hash %hash; 36 lock_keys %hash, 'perl'; 38 uuencode_it (\%hash, "Locked keys"); [all …]
|
| /mirbsd/src/gnu/usr.bin/perl/lib/Tie/ |
| D | SubstrHash.pm | 67 $offset = $hash * $rlen; 91 $offset = $hash * $rlen; 119 $offset = $hash * $rlen; 160 $hash = 2; 162 $hash = $hash * 33 + $_; 163 &_hashwrap if $hash >= 1e13; 165 &_hashwrap if $hash >= $tsize->[1]; 166 $hash = 1 unless $hash; 167 $hashbase = $hash; 171 $hash -= int($hash / $tsize->[1]) * $tsize->[1]; [all …]
|
| /mirbsd/src/lib/libc/hash/ |
| D | whirlpool.c | 647 state[0] = block[0] ^ (K[0] = structpointer->hash[0]); in processBuffer() 648 state[1] = block[1] ^ (K[1] = structpointer->hash[1]); in processBuffer() 649 state[2] = block[2] ^ (K[2] = structpointer->hash[2]); in processBuffer() 650 state[3] = block[3] ^ (K[3] = structpointer->hash[3]); in processBuffer() 651 state[4] = block[4] ^ (K[4] = structpointer->hash[4]); in processBuffer() 652 state[5] = block[5] ^ (K[5] = structpointer->hash[5]); in processBuffer() 653 state[6] = block[6] ^ (K[6] = structpointer->hash[6]); in processBuffer() 654 state[7] = block[7] ^ (K[7] = structpointer->hash[7]); in processBuffer() 838 structpointer->hash[0] ^= state[0] ^ block[0]; in processBuffer() 839 structpointer->hash[1] ^= state[1] ^ block[1]; in processBuffer() [all …]
|
| /mirbsd/src/lib/libssl/src/crypto/lhash/ |
| D | lhash.c | 126 ret->hash=((h == NULL)?(LHASH_HASH_FN_TYPE)lh_strhash:h); in lh_new() 181 unsigned long hash; in lh_insert() local 189 rn=getrn(lh,data,&hash); in lh_insert() 201 nn->hash=hash; in lh_insert() 219 unsigned long hash; in lh_delete() local 224 rn=getrn(lh,data,&hash); in lh_delete() 250 unsigned long hash; in lh_retrieve() local 255 rn=getrn(lh,data,&hash); in lh_retrieve() 309 unsigned long hash,nni; in expand() local 322 hash=np->hash; in expand() [all …]
|
| /mirbsd/src/gnu/usr.bin/perl/ext/B/t/ |
| D | f_map | 7 %hash = map { getkey($_) => $_ } @array; 10 %hash = (); 12 $hash{getkey($_)} = $_; 17 %hash = map { +"\L$_", 1 } @array; # perl guesses BLOCK. right 19 %hash = map { ("\L$_", 1) } @array; # this also works 21 %hash = map { lc($_), 1 } @array; # as does this. 23 %hash = map +( lc($_), 1 ), @array; # this is EXPR and works! 25 %hash = map ( lc($_), 1 ), @array; # evaluates to (1, @array)
|
| /mirbsd/src/usr.sbin/popa3d/ |
| D | pop_trans.c | 48 msg->hash[3], msg->hash[2], in pop_trans_list_or_uidl_all() 49 msg->hash[1], msg->hash[0], in pop_trans_list_or_uidl_all() 50 msg->hash[7], msg->hash[6], in pop_trans_list_or_uidl_all() 51 msg->hash[5], msg->hash[4])) in pop_trans_list_or_uidl_all() 78 msg->hash[3], msg->hash[2], in pop_trans_list_or_uidl() 79 msg->hash[1], msg->hash[0], in pop_trans_list_or_uidl() 80 msg->hash[7], msg->hash[6], in pop_trans_list_or_uidl() 81 msg->hash[5], msg->hash[4])) in pop_trans_list_or_uidl()
|
| /mirbsd/src/gnu/usr.bin/perl/x2p/ |
| D | hash.c | 24 register int hash; in hfetch() local 29 for (s=key, i=0, hash = 0; in hfetch() 31 s++, i++, hash *= 5) { in hfetch() 32 hash += *s * coeff[i]; in hfetch() 34 entry = tb->tbl_array[hash & tb->tbl_max]; in hfetch() 36 if (entry->hent_hash != hash) /* strings can't be equal */ in hfetch() 50 register int hash; in hstore() local 56 for (s=key, i=0, hash = 0; in hstore() 58 s++, i++, hash *= 5) { in hstore() 59 hash += *s * coeff[i]; in hstore() [all …]
|
| /mirbsd/src/gnu/usr.bin/perl/lib/Getopt/ |
| D | Std.pm | 88 my ($argumentative, $hash) = @_; 108 if (ref $hash) { 109 $$hash{$first} = $rest; 117 if (ref $hash) { 118 $$hash{$first} = 1; 132 unless (ref $hash) { 219 my ($argumentative, $hash) = @_; 240 if (ref $hash) { 241 $$hash{$first} = $rest; 249 if (ref $hash) { [all …]
|
| /mirbsd/src/gnu/usr.bin/perl/ext/Unicode/Normalize/ |
| D | mkheader | 222 foreach my $hash (\%Canon, \%Compat) { 223 foreach my $key (keys %$hash) { 224 $hash->{$key} = _U_stringify( @{ $hash->{$key} } ); 234 hash => \%Exclus, 239 hash => \%Single, 244 hash => \%NonStD, 249 hash => \%Comp2nd, 265 my @temp = sort {$a <=> $b} keys %{$tbl->{hash}}; 307 hash => \%Combin, 314 hash => \%Canon, [all …]
|
| /mirbsd/src/lib/libssl/src/doc/crypto/ |
| D | lhash.pod | 5 lh_new, lh_free, lh_insert, lh_delete, lh_retrieve, lh_doall, lh_doall_arg, lh_error - dynamic hash… 11 LHASH *lh_new(LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE compare); 31 This library implements dynamic hash tables. The hash table entries 36 entries, and provides the 'hash' and 'compare' callbacks to be used in 37 organising the table's entries. The B<hash> callback takes a pointer 38 to a table entry as its argument and returns an unsigned long hash 39 value for its key field. The hash value is normally truncated to a 40 power of 2, so make sure that your hash function returns well mixed 42 to two hash table entries), and returns 0 if their keys are equal, 43 non-zero otherwise. If your hash table will contain items of some [all …]
|
| /mirbsd/src/gnu/usr.bin/binutils/gas/ |
| D | hash.c | 45 unsigned long hash; member 157 unsigned long hash; in hash_lookup() local 169 hash = 0; in hash_lookup() 173 hash += c + (c << 17); in hash_lookup() 174 hash ^= hash >> 2; in hash_lookup() 176 hash += len + (len << 17); in hash_lookup() 177 hash ^= hash >> 2; in hash_lookup() 180 *phash = hash; in hash_lookup() 182 index = hash % table->size; in hash_lookup() 195 if (p->hash == hash) in hash_lookup() [all …]
|
| /mirbsd/src/lib/libssl/src/crypto/err/ |
| D | err.c | 230 void (*cb_thread_release)(LHASH **hash); 245 static void int_thread_release(LHASH **hash); 366 LHASH *hash; in int_err_get_item() local 369 hash = ERRFN(err_get)(0); in int_err_get_item() 370 if (!hash) in int_err_get_item() 374 p = (ERR_STRING_DATA *)lh_retrieve(hash, d); in int_err_get_item() 383 LHASH *hash; in int_err_set_item() local 386 hash = ERRFN(err_get)(1); in int_err_set_item() 387 if (!hash) in int_err_set_item() 391 p = (ERR_STRING_DATA *)lh_insert(hash, d); in int_err_set_item() [all …]
|