Skip to content

Commit fc77ceb

Browse files
committed
m
1 parent 0370e3c commit fc77ceb

File tree

1 file changed

+6
-1
lines changed
  • DynamoDbEncryption/dafny/DynamoDbEncryption/test

1 file changed

+6
-1
lines changed

DynamoDbEncryption/dafny/DynamoDbEncryption/test/Beacon.dfy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ module TestBaseBeacon {
3232
expect bytes == [0x27, 0x93, 0x93, 0x8b, 0x26, 0xe9, 0x52, 0x7e];
3333
var str :- expect b.hash([1,2,3], key := [1,2], bucket := []);
3434
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";
3539
bytes :- expect bb.getHmac([], key := [1,2]);
3640
expect bytes[7] == 0x80;
3741
str :- expect b.hash([], key := [1,2], bucket := []);
@@ -365,7 +369,7 @@ module TestBaseBeacon {
365369
];
366370
}
367371

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)
369373
{
370374
var info :- expect UTF8.Encode("AWS_DBE_SCAN_BEACON" + name);
371375
var client :- expect Primitives.AtomicPrimitives();
@@ -379,6 +383,7 @@ module TestBaseBeacon {
379383
));
380384

381385
var data :- expect UTF8.Encode(value);
386+
data := data + bucket;
382387
var input := Prim.HMacInput (
383388
digestAlgorithm := Prim.SHA_384,
384389
key := key,

0 commit comments

Comments
 (0)