Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions TestVectors/dafny/DDBEncryption/src/DecryptManifest.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module {:options "-functionSyntax:4"} DecryptManifest {
import JsonConfig
import ENC = AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorTypes
import KeyVectors
import OsLang

method OnePositiveTest(name : string, config : JSON, encrypted : JSON, plaintext : JSON, keys : KeyVectors.KeyVectorsClient)
returns (output : Result<bool, string>)
Expand Down Expand Up @@ -110,6 +111,14 @@ module {:options "-functionSyntax:4"} DecryptManifest {
}
}

function LogFileName() : string
{
if OsLang.GetOsShort() == "Windows" && OsLang.GetLanguageShort() == "Dotnet" then
"..\\..\\PerfLog.txt"
else
"../../PerfLog.txt"
}

method Decrypt(inFile : string, keyVectors: KeyVectors.KeyVectorsClient)
returns (output : Result<bool, string>)
requires keyVectors.ValidState()
Expand Down Expand Up @@ -167,11 +176,13 @@ module {:options "-functionSyntax:4"} DecryptManifest {
}
}

var time := Time.GetAbsoluteTime();
for i := 0 to |tests.value| {
var obj := tests.value[i];
:- Need(obj.1.Object?, "Value of test '" + obj.0 + "' must be an Object.");
var _ :- OneTest(obj.0, obj.1, keyVectors);
}
Time.PrintTimeSinceLong(time, "DB-ESDK-TV-Decrypt-" + inFile, Some(LogFileName()));

timeStamp :- expect Time.GetCurrentTimeStamp();
print timeStamp + " Tests Complete.\n";
Expand Down
2 changes: 1 addition & 1 deletion submodules/MaterialProviders