@@ -62,6 +62,7 @@ def Encrypt(self, dafny_encrypt_input):
62
62
"source" : native_encrypt_input .plaintext ,
63
63
"encryption_context" : native_encrypt_input .encryption_context ,
64
64
}
65
+
65
66
if native_encrypt_input .keyring is not None :
66
67
native_esdk_input ["keyring" ] = native_encrypt_input .keyring
67
68
if native_encrypt_input .materials_manager is not None :
@@ -79,51 +80,6 @@ def Encrypt(self, dafny_encrypt_input):
79
80
** native_esdk_input
80
81
)
81
82
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
-
127
83
dafny_esdk_native_encrypt_output = EncryptOutput (
128
84
ciphertext = native_esdk_ciphertext ,
129
85
encryption_context = native_esdk_header .encryption_context ,
@@ -162,19 +118,6 @@ def Decrypt(self, dafny_decrypt_input):
162
118
** native_esdk_input
163
119
)
164
120
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
-
178
121
dafny_esdk_native_decrypt_output = DecryptOutput (
179
122
plaintext = native_esdk_plaintext ,
180
123
encryption_context = native_esdk_header .encryption_context ,
0 commit comments