in AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectorGenerator/Generator.cs [149:186]
private DecryptManifest GenerateDecryptManifest(
IList<KeyValuePair<string, EncryptVector>> targetedVectors, Dictionary<string, MemoryStream> plaintexts)
{
var decryptVectors = new Dictionary<string, DecryptVector>();
foreach (var entry in targetedVectors)
{
var plaintextPath = "file://" + Path.Combine(_plaintextDir.Name, entry.Value.Scenario.PlaintextName);
var ciphertextPath = "file://" + Path.Combine(_ciphertextDir.Name, entry.Key);
decryptVectors[entry.Key] = new DecryptVector
{
Ciphertext = ciphertextPath,
MasterKeys = entry.Value.Scenario.MasterKeys,
CMM = entry.Value.Scenario.CMM,
EncryptionContext = entry.Value.Scenario.EncryptionContext,
Result = new DecryptResult
{
Output = new DecryptOutput { Plaintext = plaintextPath }
}
};
}
return new DecryptManifest
{
Meta = new ManifestMeta
{
Type = "awses-decrypt",
Version = 4
},
Client = new Client
{
Name = "ESDK-NET",
// TODO pass this by env var
Version = "4.0.0"
},
KeysUri = OutputKeysManifestUri,
VectorMap = decryptVectors
};
}