Home
last modified time | relevance | path

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

12345678910>>...62

/openbsd-src/gnu/usr.bin/perl/
H A Dsbox32_hash.h113 #define case_256_SBOX32(hash,state,key) _SBOX32_CASE(256,hash,state,key) argument
115 #define case_256_SBOX32(hash,state,key) /**/ argument
118 #define case_255_SBOX32(hash,state,key) _SBOX32_CASE(255,hash,state,key) argument
120 #define case_255_SBOX32(hash,state,key) /**/ argument
123 #define case_254_SBOX32(hash,state,key) _SBOX32_CASE(254,hash,state,key) argument
125 #define case_254_SBOX32(hash,state,key) /**/ argument
128 #define case_253_SBOX32(hash,state,key) _SBOX32_CASE(253,hash,state,key) argument
130 #define case_253_SBOX32(hash,state,key) /**/ argument
133 #define case_252_SBOX32(hash,state,key) _SBOX32_CASE(252,hash,state,key) argument
135 #define case_252_SBOX32(hash,state,key) /**/ argument
[all …]
/openbsd-src/gnu/usr.bin/perl/ext/Hash-Util/t/
H A DUtil.t56 my %hash = (foo => 42, bar => 23, locked => 'yep');
57 lock_keys(%hash);
58 eval { $hash{baz} = 99; };
61 is( $hash{bar}, 23, '$hash{bar} == 23' );
62 ok( !exists $hash{baz},'!exists $hash{baz}' );
64 delete $hash{bar};
65 ok( !exists $hash{bar},'!exists $hash{bar}' );
66 $hash{bar} = 69;
67 is( $hash{bar}, 69 ,'$hash{bar} == 69');
69 eval { () = $hash{i_dont_exist} };
[all …]
H A Dbuiltin.t16 my %hash;
18 is(bucket_ratio(%hash), 0, "Empty hash has no bucket_ratio");
19 is(num_buckets(%hash), 8, "Empty hash should have eight buckets");
20 is(used_buckets(%hash), 0, "Empty hash should have no used buckets");
22 $hash{1}= 1;
23 is(bucket_ratio(%hash), "1/8", "hash has expected bucket_ratio");
24 is(num_buckets(%hash), 8, "hash should have eight buckets");
25 is(used_buckets(%hash), 1, "hash should have one used buckets");
27 $hash{$_}= $_ for 2..7;
29 like(bucket_ratio(%hash), qr!/(?:8|16)!, "hash has expected number of buckets in bucket_ratio");
[all …]
/openbsd-src/gnu/usr.bin/perl/ext/Hash-Util/lib/Hash/
H A DUtil.pm63 Hash::Util - A selection of general-utility hash subroutines
95 my %hash = (foo => 42, bar => 23);
96 # Ways to restrict a hash
97 lock_keys(%hash);
98 lock_keys(%hash, @keyset);
99 lock_keys_plus(%hash, @additional_keys);
101 # Ways to inspect the properties of a restricted hash
102 my @legal = legal_keys(%hash);
103 my @hidden = hidden_keys(%hash);
104 my $ref = all_keys(%hash,
[all...]
/openbsd-src/sbin/isakmpd/
H A Dhash.c1 /* $OpenBSD: hash.c,v 1.25 2024/11/21 10:07:30 yasuoka Exp $ */
2 /* $EOM: hash.c,v 1.10 1999/04/17 23:20:34 niklas Exp $ */
39 #include "hash.h"
42 void hmac_init(struct hash *, unsigned char *, unsigned int);
43 void hmac_final(unsigned char *, struct hash *);
45 /* Temporary hash contexts. */
52 /* Temporary hash digest. */
55 /* Encapsulation of hash functions. */
57 static struct hash hashes[] = {
101 struct hash *
123 hmac_init(struct hash * hash,unsigned char * okey,unsigned int len) hmac_init() argument
159 hmac_final(unsigned char * dgst,struct hash * hash) hmac_final() argument
[all...]
H A Dprf.c49 memcpy(ctx->hash->ctx, ctx->ctx, ctx->hash->ctxsize); in prf_hash_init()
50 memcpy(ctx->hash->ctx2, ctx->ctx2, ctx->hash->ctxsize); in prf_hash_init()
57 ctx->hash->Update(ctx->hash->ctx, data, len); in prf_hash_update()
63 ctx->hash->HMACFinal(digest, ctx->hash); in prf_hash_final()
74 struct hash *hash; in prf_alloc() local
80 hash = hash_get(subtype); in prf_alloc()
81 if (!hash) { in prf_alloc()
107 prfctx->ctx = malloc(hash->ctxsize); in prf_alloc()
110 hash->ctxsize); in prf_alloc()
113 prfctx->ctx2 = malloc(hash->ctxsize); in prf_alloc()
[all …]
H A Dcookie.c57 struct hash *hash = hash_get(HASH_SHA1); in cookie_gen() local
61 hash->Init(hash->ctx); in cookie_gen()
63 hash->Update(hash->ctx, (u_int8_t *)name, SA_LEN(name)); in cookie_gen()
65 hash->Update(hash->ctx, (u_int8_t *)name, SA_LEN(name)); in cookie_gen()
67 hash->Update(hash->ctx, exchange->cookies + in cookie_gen()
70 hash->Update(hash->ctx, tmpsecret, COOKIE_SECRET_SIZE); in cookie_gen()
71 hash->Final(hash->digest, hash->ctx); in cookie_gen()
72 memcpy(buf, hash->digest, len); in cookie_gen()
H A Dvendor.c37 struct hash *hash; in setup_vendor_hashes() local
40 hash = hash_get(HASH_MD5); in setup_vendor_hashes()
41 if (!hash) { in setup_vendor_hashes()
47 openbsd_vendor_cap[i].hashsize = hash->hashsize; in setup_vendor_hashes()
48 openbsd_vendor_cap[i].hash = calloc(hash->hashsize, in setup_vendor_hashes()
50 if (openbsd_vendor_cap[i].hash == NULL) { in setup_vendor_hashes()
55 hash->Init(hash->ctx); in setup_vendor_hashes()
56 hash->Update(hash->ctx, in setup_vendor_hashes()
59 hash->Final(openbsd_vendor_cap[i].hash, hash->ctx); in setup_vendor_hashes()
63 (unsigned long)hash->hashsize)); in setup_vendor_hashes()
[all …]
H A Dnat_traversal.c93 struct hash *hash; in nat_t_setup_hashes() local
98 hash = hash_get(HASH_MD5); in nat_t_setup_hashes()
99 if (!hash) { in nat_t_setup_hashes()
108 isakmp_nat_t_cap[i].hashsize = hash->hashsize; in nat_t_setup_hashes()
109 isakmp_nat_t_cap[i].hash = malloc(hash->hashsize); in nat_t_setup_hashes()
110 if (!isakmp_nat_t_cap[i].hash) { in nat_t_setup_hashes()
112 (unsigned long)hash->hashsize); in nat_t_setup_hashes()
116 hash->Init(hash->ctx); in nat_t_setup_hashes()
117 hash->Update(hash->ctx, in nat_t_setup_hashes()
120 hash->Final(isakmp_nat_t_cap[i].hash, hash->ctx); in nat_t_setup_hashes()
[all …]
/openbsd-src/gnu/usr.bin/perl/ext/XS-APItest/t/
H A Dhash.t93 my %hash;
95 $setup->(\%hash);
96 $hash{a}++; @hash{qw(p i e)} = (2, 4, 8);
98 test_U_hash(\%hash, \%placebo, [f => 9, g => 10, h => 11], $mapping,
103 my (%hash, %placebo);
104 XS::APItest::Hash::bitflip_hash(\%hash);
128 $hash{$key} = $placebo{$key} = $code;
129 $hash{$key_utf8} = $placebo{$key_utf8} = "$code as UTF-8";
144 test_U_hash(\%hash, \%placebo, \@new_kv, \&bitflip, $name);
157 my %hash;
[all …]
/openbsd-src/gnu/usr.bin/perl/lib/Tie/
H A DSubstrHash.pm65 my $hashbase = my $hash = hashkey($key, $klen, $tsize);
67 my $offset = $hash * $rlen;
77 $hash = rehash($hash, $hashbase, $tsize);
89 my $hashbase = my $hash = hashkey($key, $klen, $tsize);
91 my $offset = $hash * $rlen;
110 $hash = rehash($hash, $hashbase, $tsize);
117 my $hashbase = my $hash = hashkey($key, $klen, $tsize);
119 my $offset = $hash * $rlen;
131 $hash = rehash($hash, $hashbase, $tsize);
161 my $hash = 2;
[all …]
/openbsd-src/gnu/usr.bin/perl/dist/threads-shared/t/
H A D0nothread.t9 my %hash;
11 sub hash
14 is(keys %hash, 0, "hash empty");
15 $hash{0} = $val[0];
16 is(keys %hash,1, "Assign grows hash");
17 is($hash{0},$val[0],"Value correct");
18 $hash{2} = $val[2];
19 is(keys %hash,2, "Assign grows hash");
20 is($hash{0},$val[0],"Value correct");
21 is($hash{2},$val[2],"Value correct");
[all …]
H A Dobject2.t104 # Testing with hash object
106 ok($created[$ID], 'Created hash object in normal array');
108 ok($destroyed[$ID], 'Deleted hash object in normal array');
111 ok($created[$ID], 'Created hash object in normal array');
113 ok($destroyed[$ID], 'Undef hash object in normal array');
116 ok($created[$ID], 'Created hash object in normal array');
118 ok($created[$ID], 'Created hash object in normal array');
119 ok($destroyed[$ID-1], 'Replaced hash object in normal array');
124 ok($created[$ID], 'Created hash object in normal array');
176 # Testing with normal hash
[all …]
H A Dhv_simple.t39 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 …]
H A Dblessed.t58 $$hobj{'hash'} = bless(&share({}), 'yin');
65 ok(2, ref($hobj) eq 'foo', "hash blessing does work");
70 ok(6, ref($$aobj[0]) eq 'yin', "blessed hash in array");
75 ok(10, ref($$hobj{'hash'}) eq 'yin', "blessed hash in hash");
76 ok(11, ref($$hobj{'array'}) eq 'yang', "blessed array in hash");
77 ok(12, ref($$hobj{'scalar'}) eq 'baz', "blessed scalar in hash");
78 ok(13, ${$$hobj{'scalar'}} eq '3', "blessed scalar in hash contents");
83 ok(14, ref($hobj) eq 'foo', "hash blessing does work");
88 ok(18, ref($$aobj[0]) eq 'yin', "blessed hash in array");
93 ok(22, ref($$hobj{'hash'}) eq 'yin', "blessed hash in hash");
[all …]
/openbsd-src/gnu/usr.bin/perl/cpan/Tie-RefHash/t/
H A Dthreaded.t43 tie my %hash, "Tie::RefHash";
49 $hash{$r1} = "hash";
50 $hash{$r2} = "array";
51 $hash{$v1} = "string";
53 is( $hash{$v1}, "string", "fetch by string before clone ($v1)" );
54 is( $hash{$r1}, "hash", "fetch by ref before clone ($r1)" );
55 is( $hash{$r2}, "array", "fetch by ref before clone ($r2)" );
58 is( scalar keys %hash, 3, "key count is OK" );
60 ok( exists $hash{$v1}, "string key exists ($v1)" );
61 is( $hash{$v1}, "string", "fetch by string" );
[all …]
/openbsd-src/regress/usr.sbin/rpki-client/rrdp/
H A Drrdp-r2.out3 test-rrdp: snapshot hash: AE52F78BCB1B258A1DA924122971B0FDDFCE4C01B2B2DBA59C9B28EF1D94C02B
5 test-rrdp: delta hash: 40521FB9995ACA55D39360985C336619E08072A6AFFFCE97753E701A0D65D57B
7 test-rrdp: delta hash: 1036A71DF3129449E1403F3BEACFA427D59659FAC0B45C9E3DFFDBEBDB17D722
9 test-rrdp: delta hash: E8DE1E10D05734BB9EFE65202B96023D3770F0B8FD457249676214612F4685B3
11 test-rrdp: delta hash: CDCD746257A0F35BBCE0B1832C2DF4CF25751C281FDE23CAE8B17F607F1E82E1
13 test-rrdp: delta hash: 50C95FF4B63C03836FE291AFCA61FDA25C96BC0D280E421DDDC307E591FE8F81
15 test-rrdp: delta hash: 7C9C62DA4DD109E5151FCC0EA366DB343E35AB7F2A62D81D6C54EEE1E1FD72B1
17 test-rrdp: delta hash: 20360D8B294E3A6E62DE2AF58955AFE601507231E6937B375DE0C047A69CD9C1
19 test-rrdp: delta hash: B4AE54C1207EC9A12A5E20091004830FB3D146F62B2396A6C3DE2AB0795ED2E7
21 test-rrdp: delta hash: FCD7FE3D59F4B8DAA40920C7B3C5C4D149660AFD35DFCA53EDE7671919802CFB
[all …]
/openbsd-src/gnu/usr.bin/perl/dist/Storable/t/
H A Dmake_downgrade.pl21 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 …]
/openbsd-src/regress/sbin/isakmpd/hmac/
H A Dhmactest.c39 int test_hmac(char *, struct hash *, char *, int, char *, int, char *);
66 test_hmac(char *test, struct hash *hash, char *key, int klen, in test_hmac() argument
74 hash->HMACInit(hash, key, klen); in test_hmac()
75 hash->Update(hash->ctx, data, dlen); in test_hmac()
76 hash->HMACFinal(hash->digest, hash); in test_hmac()
78 for (i=0; i<hash->hashsize; i++) in test_hmac()
80 output[2*i] = nibble2c((hash->digest[i] >> 4) & 0xf); in test_hmac()
81 output[2*i+1] = nibble2c(hash->digest[i] & 0xf); in test_hmac()
/openbsd-src/gnu/usr.bin/binutils-2.17/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 …]
/openbsd-src/gnu/usr.bin/binutils/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 …]
/openbsd-src/gnu/usr.bin/perl/ext/Hash-Util-FieldHash/t/
H A D11_hashassign.t11 # $foo{string} into a shared hash key scalar. It might be worth making the
12 # tokeniser build the LHS of => as a shared hash key scalar too.
20 ok (keys %comma == 1, 'keys on comma hash');
21 ok (values %comma == 1, 'values on comma hash');
32 is_deeply (\@comma, \@temp, 'list from comma hash');
35 is_deeply (\@comma, \@temp, 'first each from comma hash');
37 is_deeply ([], \@temp, 'last each from comma hash');
41 ok (keys %temp == 1, 'keys on copy of comma hash');
42 ok (values %temp == 1, 'values on copy of comma hash');
50 is_deeply (\@temp, \@temp, 'list from copy of comma hash');
[all …]
/openbsd-src/gnu/lib/libstdc++/libstdc++/include/ext/
H A Dstl_hash_fun.h71 template <class _Key> struct hash { }; struct
82 template<> struct hash<char*>
87 template<> struct hash<const char*>
92 template<> struct hash<char> {
95 template<> struct hash<unsigned char> {
98 template<> struct hash<signed char> {
101 template<> struct hash<short> {
104 template<> struct hash<unsigned short> {
107 template<> struct hash<int> {
110 template<> struct hash<unsigned int> {
[all …]
/openbsd-src/gnu/gcc/libstdc++-v3/include/ext/
H A Dhash_fun.h71 struct hash { }; struct
83 struct hash<char*>
91 struct hash<const char*>
99 struct hash<char>
107 struct hash<unsigned char>
115 struct hash<signed char>
123 struct hash<short>
131 struct hash<unsigned short>
139 struct hash<int>
147 struct hash<unsigned int>
[all …]
/openbsd-src/usr.sbin/pkg_add/OpenBSD/
H A DGetopt.pm29 sub handle_option($opt, $hash, @params)
31 if (defined $hash->{$opt} and ref($hash->{$opt}) eq 'CODE') {
32 &{$hash->{$opt}}(@params);
39 $hash->{$opt} = $params[0];
42 $hash->{$opt}++;
48 sub getopts($args, $hash = {})
65 handle_option($opt, $hash, $other);
67 handle_option($opt, $hash);
80 return $hash;

12345678910>>...62