@@ -32,6 +32,10 @@ module TestBaseBeacon {
32
32
expect bytes == [0x27, 0x93, 0x93, 0x8b, 0x26, 0xe9, 0x52, 0x7e];
33
33
var str :- expect b. hash ([1,2,3], key := [1,2], bucket := []);
34
34
expect str == "7e";
35
+ str :- expect b. hash ([1,2,3], key := [1,2], bucket := [1]);
36
+ expect str == "1d";
37
+ str :- expect b. hash ([1,2,3], key := [1,2], bucket := [2]);
38
+ expect str == "ef";
35
39
bytes :- expect bb. getHmac ([], key := [1,2]);
36
40
expect bytes[7] == 0x80;
37
41
str :- expect b. hash ([], key := [1,2], bucket := []);
@@ -365,7 +369,7 @@ module TestBaseBeacon {
365
369
];
366
370
}
367
371
368
- method GetBeaconValue (name : string , key : Bytes , value : string , length : BeaconLength ) returns (output : string )
372
+ method GetBeaconValue (name : string , key : Bytes , value : string , length : BeaconLength , bucket : Bytes := [] ) returns (output : string )
369
373
{
370
374
var info :- expect UTF8. Encode ("AWS_DBE_SCAN_BEACON" + name);
371
375
var client :- expect Primitives. AtomicPrimitives ();
@@ -379,6 +383,7 @@ module TestBaseBeacon {
379
383
));
380
384
381
385
var data :- expect UTF8. Encode (value);
386
+ data := data + bucket;
382
387
var input := Prim. HMacInput (
383
388
digestAlgorithm := Prim.SHA_384,
384
389
key := key,
0 commit comments