Skip to content

Commit 98849ee

Browse files
Refactor to remove extra blank line to make the code look better
1 parent 0c638cb commit 98849ee

File tree

2 files changed

+4
-71
lines changed

2 files changed

+4
-71
lines changed

DynamoDbEncryption/dafny/DynamoDbEncryption/src/AwsCryptographyDbEncryptionSdkDynamoDbOperations.dfy

+1-6
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ module AwsCryptographyDbEncryptionSdkDynamoDbOperations refines AbstractAwsCrypt
99
import UUID
1010
import AlgorithmSuites
1111
import DynamoToStruct
12-
import opened DynamoDbEncryptionUtil
13-
1412
import Header = StructuredEncryptionHeader
13+
import opened DynamoDbEncryptionUtil
1514

1615
predicate ValidInternalConfig?(config: InternalConfig)
1716
{true}
@@ -91,7 +90,6 @@ module AwsCryptographyDbEncryptionSdkDynamoDbOperations refines AbstractAwsCrypt
9190

9291
var extractedKeyProviderId := UTF8.Decode(datakeys[i].keyProviderId).Extract();
9392
var extractedKeyProviderIdInfo := UTF8.Decode(datakeys[i].keyProviderInfo).Extract();
94-
9593
if |extractedKeyProviderId| < 7 || extractedKeyProviderId[0..7] != "aws-kms" {
9694
singleDataKeyOutput := EncryptedDataKeyDescriptionOutput(
9795
keyProviderId := extractedKeyProviderId,
@@ -111,14 +109,11 @@ module AwsCryptographyDbEncryptionSdkDynamoDbOperations refines AbstractAwsCrypt
111109

112110
var EDK_CIPHERTEXT_BRANCH_KEY_VERSION_INDEX := 12 + 16;
113111
var EDK_CIPHERTEXT_VERSION_INDEX := EDK_CIPHERTEXT_BRANCH_KEY_VERSION_INDEX + 16;
114-
115112
:- Need(EDK_CIPHERTEXT_BRANCH_KEY_VERSION_INDEX < EDK_CIPHERTEXT_VERSION_INDEX, E("Wrong branch key version index."));
116113
:- Need(|providerWrappedMaterial| >= EDK_CIPHERTEXT_VERSION_INDEX, E("Incorrect ciphertext structure length."));
117114
var branchKeyVersionUuid := providerWrappedMaterial[EDK_CIPHERTEXT_BRANCH_KEY_VERSION_INDEX .. EDK_CIPHERTEXT_VERSION_INDEX];
118-
119115
:- Need(UUID.FromByteArray(branchKeyVersionUuid).Success?, E("Failed to convert UUID from byte array."));
120116
var expectedBranchKeyVersion := UUID.FromByteArray(branchKeyVersionUuid).Extract();
121-
122117
singleDataKeyOutput := EncryptedDataKeyDescriptionOutput(
123118
keyProviderId := extractedKeyProviderId,
124119
keyProviderInfo := Some(extractedKeyProviderIdInfo),

DynamoDbEncryption/dafny/DynamoDbEncryption/test/DynamoDbGetEncryptedDataKeyDescriptionTest.dfy

+3-65
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,16 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
1414
import EdkWrapping
1515
import AlgorithmSuites
1616

17+
// THIS IS A TESTING RESOURCE DO NOT USE IN A PRODUCTION ENVIRONMENT
1718
const testVersion : Version := 1
18-
1919
const testFlavor : Flavor := 1
20-
2120
const testMsgID : MessageID := [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]
22-
2321
const testLegend : Legend := [0x65, 0x73]
24-
2522
const testEncContext : CMPEncryptionContext := map[EncodeAscii("abc") := EncodeAscii("def")]
26-
2723
const testAwsKmsDataKey := CMP.EncryptedDataKey(
2824
keyProviderId := EncodeAscii("aws-kms") ,
2925
keyProviderInfo := EncodeAscii("keyproviderInfo"),
3026
ciphertext := [1, 2, 3, 4, 5])
31-
3227
const testAwsKmsHDataKey := CMP.EncryptedDataKey(
3328
keyProviderId := EncodeAscii("aws-kms-hierarchy") ,
3429
keyProviderInfo := EncodeAscii("keyproviderInfo"),
@@ -43,19 +38,16 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
4338
107, 5, 120, 20, 95, 78, 70, 2, 49, 84, 39, 50, 40, 40, 115,
4439
114, 76, 18, 103, 84, 34, 123, 1, 125, 61, 33, 13, 18, 81,
4540
24, 53, 53, 26, 60, 52, 85, 81, 96, 85, 72])
46-
4741
const testRawRsaDataKey := CMP.EncryptedDataKey(
4842
keyProviderId := EncodeAscii("raw-rsa") ,
4943
keyProviderInfo := [1, 2, 3, 4, 5],
5044
ciphertext := [6, 7, 8, 9])
51-
5245
const testAwsKmsRsaDataKey := CMP.EncryptedDataKey(
5346
keyProviderId := EncodeAscii("aws-kms-rsa") ,
5447
keyProviderInfo := EncodeAscii("keyproviderInfo"),
5548
ciphertext := [1, 2, 3, 4, 5])
56-
5749
const algorithmSuite := AlgorithmSuites.DBE_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384
58-
50+
5951
method CreatePartialHeader(version : Version, flavor : Flavor, msgID : MessageID, legend : Legend, encContext : CMPEncryptionContext, dataKeyList : CMPEncryptedDataKeyList)
6052
returns (result: PartialHeader)
6153
ensures result.version == version
@@ -79,24 +71,19 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
7971
{
8072
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testAwsKmsDataKey]);
8173
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
82-
8374
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
84-
8575
var inputVariable: Types.GetEncryptedDataKeyDescriptionInput :=
8676
Types.GetEncryptedDataKeyDescriptionInput(
8777
input := Types.header(header := serializedHeader)
8878
);
89-
9079
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
9180

9281
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Success?;
9382
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Success?;
9483
expect actualDataKeyDescription.Success?;
9584
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| > 0;
96-
9785
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
9886
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderId == UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Extract();
99-
10087
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Some?;
10188
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Extract() == UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Extract();
10289
}
@@ -105,25 +92,20 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
10592
{
10693
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testAwsKmsHDataKey]);
10794
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
108-
10995
var expectedBranchKeyVersion := getBranchKeyVersion(expectedHead);
11096
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
111-
11297
var inputVariable: Types.GetEncryptedDataKeyDescriptionInput :=
11398
Types.GetEncryptedDataKeyDescriptionInput(
11499
input := Types.header(header := serializedHeader)
115100
);
116-
117101
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
118102

119103
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Success?;
120104
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Success?;
121105
expect actualDataKeyDescription.Success?;
122106
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| > 0;
123-
124107
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
125108
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderId == UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Extract();
126-
127109
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Some?;
128110
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Extract() == UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Extract();
129111

@@ -140,24 +122,19 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
140122
{
141123
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testRawRsaDataKey]);
142124
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
143-
144125
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
145-
146126
var inputVariable: Types.GetEncryptedDataKeyDescriptionInput :=
147127
Types.GetEncryptedDataKeyDescriptionInput(
148128
input := Types.header(header := serializedHeader)
149129
);
150-
151130
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
152131

153132
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Success?;
154133
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Success?;
155134
expect actualDataKeyDescription.Success?;
156135
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| > 0;
157-
158136
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
159137
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderId == UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Extract();
160-
161138
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Some?;
162139
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Extract() == UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Extract();
163140
}
@@ -166,24 +143,19 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
166143
{
167144
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testAwsKmsRsaDataKey]);
168145
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
169-
170146
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
171-
172147
var inputVariable: Types.GetEncryptedDataKeyDescriptionInput :=
173148
Types.GetEncryptedDataKeyDescriptionInput(
174149
input := Types.header(header := serializedHeader)
175150
);
176-
177151
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
178152

179153
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Success?;
180154
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Success?;
181155
expect actualDataKeyDescription.Success?;
182156
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| > 0;
183-
184157
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
185158
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderId == UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Extract();
186-
187159
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Some?;
188160
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Extract() == UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Extract();
189161
}
@@ -193,7 +165,6 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
193165
{
194166
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testAwsKmsDataKey]);
195167
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
196-
197168
var attr := map["aws_dbe_head" := ComAmazonawsDynamodbTypes.AttributeValue.B(serializedHeader)];
198169
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
199170

@@ -203,15 +174,12 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
203174
);
204175

205176
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
206-
207177
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Success?;
208178
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Success?;
209179
expect actualDataKeyDescription.Success?;
210180
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| > 0;
211-
212181
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
213182
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderId == UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Extract();
214-
215183
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Some?;
216184
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Extract() == UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Extract();
217185
}
@@ -220,33 +188,27 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
220188
{
221189
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testAwsKmsHDataKey]);
222190
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
223-
224191
var expectedBranchKeyVersion := getBranchKeyVersion(expectedHead);
225192
var attr := map["aws_dbe_head" := ComAmazonawsDynamodbTypes.AttributeValue.B(serializedHeader)];
226193
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
227-
228194
var inputVariable: Types.GetEncryptedDataKeyDescriptionInput :=
229195
Types.GetEncryptedDataKeyDescriptionInput(
230196
input := Types.plaintextItem(plaintextItem := attr)
231197
);
232-
233198
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
234199

235200
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Success?;
236201
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Success?;
237202
expect actualDataKeyDescription.Success?;
238203
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| > 0;
239-
240204
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
241205
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderId == UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Extract();
242-
243206
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Some?;
244207
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Extract() == UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Extract();
245208

246209
if actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderId == "aws-kms-hierarchy" {
247210
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].branchKeyId.Some?;
248211
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].branchKeyVersion.Some?;
249-
250212
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].branchKeyId.Extract() == UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Extract();
251213
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].branchKeyVersion.Extract() == expectedBranchKeyVersion;
252214
}
@@ -256,26 +218,20 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
256218
{
257219
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testRawRsaDataKey]);
258220
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
259-
260221
var attr := map["aws_dbe_head" := ComAmazonawsDynamodbTypes.AttributeValue.B(serializedHeader)];
261222
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
262-
263-
264223
var inputVariable: Types.GetEncryptedDataKeyDescriptionInput :=
265224
Types.GetEncryptedDataKeyDescriptionInput(
266225
input := Types.plaintextItem(plaintextItem := attr)
267-
);
268-
226+
);
269227
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
270228

271229
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Success?;
272230
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Success?;
273231
expect actualDataKeyDescription.Success?;
274232
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| > 0;
275-
276233
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
277234
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderId == UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Extract();
278-
279235
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Some?;
280236
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Extract() == UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Extract();
281237
}
@@ -284,26 +240,20 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
284240
{
285241
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testAwsKmsRsaDataKey]);
286242
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
287-
288243
var attr := map["aws_dbe_head" := ComAmazonawsDynamodbTypes.AttributeValue.B(serializedHeader)];
289244
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
290-
291-
292245
var inputVariable: Types.GetEncryptedDataKeyDescriptionInput :=
293246
Types.GetEncryptedDataKeyDescriptionInput(
294247
input := Types.plaintextItem(plaintextItem := attr)
295248
);
296-
297249
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
298250

299251
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Success?;
300252
expect UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Success?;
301253
expect actualDataKeyDescription.Success?;
302254
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| > 0;
303-
304255
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
305256
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderId == UTF8.Decode(expectedHead.dataKeys[0].keyProviderId).Extract();
306-
307257
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Some?;
308258
expect actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.Extract() == UTF8.Decode(expectedHead.dataKeys[0].keyProviderInfo).Extract();
309259
}
@@ -312,14 +262,11 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
312262
{
313263
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testAwsKmsDataKey, testAwsKmsRsaDataKey]);
314264
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
315-
316265
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
317-
318266
var inputVariable: Types.GetEncryptedDataKeyDescriptionInput :=
319267
Types.GetEncryptedDataKeyDescriptionInput(
320268
input := Types.header(header := serializedHeader)
321269
);
322-
323270
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
324271

325272
expect actualDataKeyDescription.Success?;
@@ -343,18 +290,13 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
343290
{
344291
var expectedHead := CreatePartialHeader(testVersion, testFlavor, testMsgID, testLegend, testEncContext, [testAwsKmsDataKey, testAwsKmsRsaDataKey]);
345292
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;
346-
347293
var attr := map["aws_dbe_head" := ComAmazonawsDynamodbTypes.AttributeValue.B(serializedHeader)];
348294
var ddbEncResources :- expect DynamoDbEncryption.DynamoDbEncryption();
349-
350-
351295
var inputVariable: Types.GetEncryptedDataKeyDescriptionInput :=
352296
Types.GetEncryptedDataKeyDescriptionInput(
353297
input := Types.plaintextItem(plaintextItem := attr)
354298
);
355-
356299
var actualDataKeyDescription := ddbEncResources.GetEncryptedDataKeyDescription(inputVariable);
357-
358300
expect actualDataKeyDescription.Success?;
359301
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
360302
expect |actualDataKeyDescription.Extract().EncryptedDataKeyDescriptionOutput| > 0;
@@ -377,13 +319,9 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
377319
{
378320
expect EdkWrapping.GetProviderWrappedMaterial(expectedHead.dataKeys[0].ciphertext, algorithmSuite).Success?;
379321
var providerWrappedMaterial := EdkWrapping.GetProviderWrappedMaterial(expectedHead.dataKeys[0].ciphertext, algorithmSuite).Extract();
380-
381322
expect |providerWrappedMaterial| >= (28 + 16);
382-
383323
var expectedBranchKeyVersionResult := UUID.FromByteArray(providerWrappedMaterial[28 .. (28 + 16)]);
384-
385324
expect expectedBranchKeyVersionResult.Success?;
386-
387325
expectedBranchKeyVersion := expectedBranchKeyVersionResult.Extract();
388326
}
389327
}

0 commit comments

Comments
 (0)