Skip to content

Commit 2ca85fa

Browse files
m
1 parent bbb1c56 commit 2ca85fa

File tree

1 file changed

+1
-58
lines changed
  • TestVectors/runtimes/python/src/aws_encryption_sdk_test_vectors/internaldafny/extern

1 file changed

+1
-58
lines changed

TestVectors/runtimes/python/src/aws_encryption_sdk_test_vectors/internaldafny/extern/wrapped_esdk.py

+1-58
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def Encrypt(self, dafny_encrypt_input):
6262
"source": native_encrypt_input.plaintext,
6363
"encryption_context": native_encrypt_input.encryption_context,
6464
}
65+
6566
if native_encrypt_input.keyring is not None:
6667
native_esdk_input["keyring"] = native_encrypt_input.keyring
6768
if native_encrypt_input.materials_manager is not None:
@@ -79,51 +80,6 @@ def Encrypt(self, dafny_encrypt_input):
7980
**native_esdk_input
8081
)
8182

82-
# if native_encrypt_input.algorithm_suite_id is None:
83-
# if native_encrypt_input.materials_manager is not None:
84-
# native_esdk_ciphertext, native_esdk_header = (
85-
# self.native_esdk.encrypt(
86-
# source=native_encrypt_input.plaintext,
87-
# materials_manager=native_encrypt_input.materials_manager,
88-
# encryption_context=native_encrypt_input.encryption_context,
89-
# )
90-
# )
91-
# else:
92-
# native_esdk_ciphertext, native_esdk_header = (
93-
# self.native_esdk.encrypt(
94-
# source=native_encrypt_input.plaintext,
95-
# materials_manager=native_encrypt_input.keyring,
96-
# encryption_context=native_encrypt_input.encryption_context,
97-
# )
98-
# )
99-
# else:
100-
# if native_encrypt_input.materials_manager is not None:
101-
# native_esdk_ciphertext, native_esdk_header = (
102-
# self.native_esdk.encrypt(
103-
# source=native_encrypt_input.plaintext,
104-
# materials_manager=native_encrypt_input.materials_manager,
105-
# encryption_context=native_encrypt_input.encryption_context,
106-
# algorithm=AlgorithmSuite.get_by_id(
107-
# _mpl_algorithm_id_to_native_algorithm_id(
108-
# native_encrypt_input.algorithm_suite_id
109-
# )
110-
# ),
111-
# )
112-
# )
113-
# else:
114-
# native_esdk_ciphertext, native_esdk_header = (
115-
# self.native_esdk.encrypt(
116-
# source=native_encrypt_input.plaintext,
117-
# materials_manager=native_encrypt_input.keyring,
118-
# encryption_context=native_encrypt_input.encryption_context,
119-
# algorithm=AlgorithmSuite.get_by_id(
120-
# _mpl_algorithm_id_to_native_algorithm_id(
121-
# native_encrypt_input.algorithm_suite_id
122-
# )
123-
# ),
124-
# )
125-
# )
126-
12783
dafny_esdk_native_encrypt_output = EncryptOutput(
12884
ciphertext=native_esdk_ciphertext,
12985
encryption_context=native_esdk_header.encryption_context,
@@ -162,19 +118,6 @@ def Decrypt(self, dafny_decrypt_input):
162118
**native_esdk_input
163119
)
164120

165-
# if native_decrypt_input.materials_manager is not None:
166-
# native_esdk_plaintext, native_esdk_header = self.native_esdk.decrypt(
167-
# source=native_decrypt_input.ciphertext,
168-
# materials_manager=native_decrypt_input.materials_manager,
169-
# encryption_context=native_decrypt_input.encryption_context,
170-
# )
171-
# else:
172-
# native_esdk_plaintext, native_esdk_header = self.native_esdk.decrypt(
173-
# source=native_decrypt_input.ciphertext,
174-
# materials_manager=native_decrypt_input.keyring,
175-
# encryption_context=native_decrypt_input.encryption_context,
176-
# )
177-
178121
dafny_esdk_native_decrypt_output = DecryptOutput(
179122
plaintext=native_esdk_plaintext,
180123
encryption_context=native_esdk_header.encryption_context,

0 commit comments

Comments
 (0)