Skip to content

Commit 21ad206

Browse files
authored
fix: for test vectors, use SetToSequenceSorted (#1034)
1 parent 5a7ddbf commit 21ad206

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/VectorsComposition/AllDefaultCmm.dfy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ module {:options "-functionSyntax:4"} AllDefaultCmm {
9292
encryptDescription := RawAesKeyring,
9393
decryptDescription := RawAesKeyring,
9494
encryptionContext := encryptionContext,
95-
requiredEncryptionContextKeys := Some(SortedSets.ComputeSetToSequence(requiredEncryptionContextKeys)),
95+
requiredEncryptionContextKeys := Some(SortedSets.ComputeSetToOrderedSequence2(requiredEncryptionContextKeys, (a, b) => a < b)),
9696
reproducedEncryptionContext := Some(reproducedEncryptionContext)
9797
)
9898

@@ -127,7 +127,7 @@ module {:options "-functionSyntax:4"} AllDefaultCmm {
127127
encryptDescription := RawAesKeyring,
128128
decryptDescription := RawAesKeyring,
129129
encryptionContext := encryptionContext,
130-
requiredEncryptionContextKeys := Some(SortedSets.ComputeSetToSequence(requiredEncryptionContextKeys)),
130+
requiredEncryptionContextKeys := Some(SortedSets.ComputeSetToOrderedSequence2(requiredEncryptionContextKeys, (a, b) => a < b)),
131131
reproducedEncryptionContext := Some(reproducedEncryptionContext)
132132
)
133133

TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/VectorsComposition/AllRequiredEncryptionContextCmm.dfy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ module {:options "-functionSyntax:4"} AllRequiredEncryptionContextCmm {
5656
encryptDescription := KeyVectorsTypes.RequiredEncryptionContext(
5757
KeyVectorsTypes.RequiredEncryptionContextCMM(
5858
underlying := AllDefaultCmm.RawAesKeyring,
59-
requiredEncryptionContextKeys := SortedSets.ComputeSetToSequence(requiredEncryptionContextKeys)
59+
requiredEncryptionContextKeys := SortedSets.ComputeSetToOrderedSequence2(requiredEncryptionContextKeys, (a, b) => a < b)
6060
)
6161
),
6262
decryptDescription := KeyVectorsTypes.RequiredEncryptionContext(
6363
KeyVectorsTypes.RequiredEncryptionContextCMM(
6464
underlying := AllDefaultCmm.RawAesKeyring,
65-
requiredEncryptionContextKeys := SortedSets.ComputeSetToSequence(requiredEncryptionContextKeys)
65+
requiredEncryptionContextKeys := SortedSets.ComputeSetToOrderedSequence2(requiredEncryptionContextKeys, (a, b) => a < b)
6666
)
6767
),
6868
encryptionContext := encryptionContext,
69-
requiredEncryptionContextKeys := Some(SortedSets.ComputeSetToSequence(requiredEncryptionContextKeys)),
69+
requiredEncryptionContextKeys := Some(SortedSets.ComputeSetToOrderedSequence2(requiredEncryptionContextKeys, (a, b) => a < b)),
7070
reproducedEncryptionContext := Some(reproducedEncryptionContext)
7171
)
7272

@@ -102,17 +102,17 @@ module {:options "-functionSyntax:4"} AllRequiredEncryptionContextCmm {
102102
encryptDescription := KeyVectorsTypes.RequiredEncryptionContext(
103103
KeyVectorsTypes.RequiredEncryptionContextCMM(
104104
underlying := AllDefaultCmm.RawAesKeyring,
105-
requiredEncryptionContextKeys := SortedSets.ComputeSetToSequence(requiredEncryptionContextKeys)
105+
requiredEncryptionContextKeys := SortedSets.ComputeSetToOrderedSequence2(requiredEncryptionContextKeys, (a, b) => a < b)
106106
)
107107
),
108108
decryptDescription := KeyVectorsTypes.RequiredEncryptionContext(
109109
KeyVectorsTypes.RequiredEncryptionContextCMM(
110110
underlying := AllDefaultCmm.RawAesKeyring,
111-
requiredEncryptionContextKeys := SortedSets.ComputeSetToSequence(requiredEncryptionContextKeys)
111+
requiredEncryptionContextKeys := SortedSets.ComputeSetToOrderedSequence2(requiredEncryptionContextKeys, (a, b) => a < b)
112112
)
113113
),
114114
encryptionContext := encryptionContext,
115-
requiredEncryptionContextKeys := Some(SortedSets.ComputeSetToSequence(requiredEncryptionContextKeys)),
115+
requiredEncryptionContextKeys := Some(SortedSets.ComputeSetToOrderedSequence2(requiredEncryptionContextKeys, (a, b) => a < b)),
116116
reproducedEncryptionContext := Some(reproducedEncryptionContext)
117117
)
118118
// These are only required encryption context vectors with static aes keyrings

0 commit comments

Comments
 (0)