Skip to content

Commit bc13ae4

Browse files
clean
1 parent 55ee26f commit bc13ae4

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

examples/src/migration/migration_aws_kms_key_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,14 @@ def migration_aws_kms_key(
115115
aws_kms_master_key_provider = create_key_provider(kms_key_id=kms_key_id)
116116

117117
# 2a. Encrypt EXAMPLE_DATA using AWS KMS Keyring
118-
ciphertext_keyring, enc_header_keyring = client.encrypt(
118+
ciphertext_keyring, encrypted_header_keyring = client.encrypt(
119119
source=EXAMPLE_DATA,
120120
keyring=aws_kms_keyring,
121121
encryption_context=DEFAULT_ENCRYPTION_CONTEXT
122122
)
123123

124124
# 2b. Encrypt EXAMPLE_DATA using AWS KMS Master Key Provider
125-
ciphertext_mkp, enc_header_mkp = client.encrypt(
125+
ciphertext_mkp, encrypted_header_mkp = client.encrypt(
126126
source=EXAMPLE_DATA,
127127
key_provider=aws_kms_master_key_provider,
128128
encryption_context=DEFAULT_ENCRYPTION_CONTEXT
@@ -153,7 +153,7 @@ def migration_aws_kms_key(
153153
# includes all key pairs from the encrypt operation. (The SDK can add pairs, so don't require an exact match.)
154154
assert all(
155155
pair in decrypted_header_keyring_using_mkp.encryption_context.items()
156-
for pair in enc_header_keyring.encryption_context.items()
156+
for pair in encrypted_header_keyring.encryption_context.items()
157157
)
158158

159159
assert decrypted_ciphertext_keyring_using_keyring == decrypted_ciphertext_keyring_using_mkp \
@@ -180,7 +180,7 @@ def migration_aws_kms_key(
180180
# includes all key pairs from the encrypt operation. (The SDK can add pairs, so don't require an exact match.)
181181
assert all(
182182
pair in decrypted_header_mkp_using_mkp.encryption_context.items()
183-
for pair in enc_header_mkp.encryption_context.items()
183+
for pair in encrypted_header_mkp.encryption_context.items()
184184
)
185185

186186
assert decrypted_ciphertext_mkp_using_keyring == decrypted_ciphertext_mkp_using_mkp \

examples/src/migration/migration_raw_aes_key_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,14 @@ def migration_raw_aes_key():
156156
raw_aes_master_key_provider = create_key_provider()
157157

158158
# 2a. Encrypt EXAMPLE_DATA using Raw AES Keyring
159-
ciphertext_keyring, enc_header_keyring = client.encrypt(
159+
ciphertext_keyring, encrypted_header_keyring = client.encrypt(
160160
source=EXAMPLE_DATA,
161161
keyring=raw_aes_keyring,
162162
encryption_context=DEFAULT_ENCRYPTION_CONTEXT
163163
)
164164

165165
# 2b. Encrypt EXAMPLE_DATA using Raw AES Master Key Provider
166-
ciphertext_mkp, enc_header_mkp = client.encrypt(
166+
ciphertext_mkp, encrypted_header_mkp = client.encrypt(
167167
source=EXAMPLE_DATA,
168168
key_provider=raw_aes_master_key_provider,
169169
encryption_context=DEFAULT_ENCRYPTION_CONTEXT
@@ -194,7 +194,7 @@ def migration_raw_aes_key():
194194
# includes all key pairs from the encrypt operation. (The SDK can add pairs, so don't require an exact match.)
195195
assert all(
196196
pair in decrypted_header_keyring_using_mkp.encryption_context.items()
197-
for pair in enc_header_keyring.encryption_context.items()
197+
for pair in encrypted_header_keyring.encryption_context.items()
198198
)
199199

200200
assert decrypted_ciphertext_keyring_using_keyring == decrypted_ciphertext_keyring_using_mkp \
@@ -221,7 +221,7 @@ def migration_raw_aes_key():
221221
# includes all key pairs from the encrypt operation. (The SDK can add pairs, so don't require an exact match.)
222222
assert all(
223223
pair in decrypted_header_mkp_using_mkp.encryption_context.items()
224-
for pair in enc_header_mkp.encryption_context.items()
224+
for pair in encrypted_header_mkp.encryption_context.items()
225225
)
226226

227227
assert decrypted_ciphertext_mkp_using_keyring == decrypted_ciphertext_mkp_using_mkp \

examples/src/migration/migration_raw_rsa_key_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,14 @@ def migration_raw_rsa_key(
208208
raw_rsa_master_key_provider = create_key_provider()
209209

210210
# 2a. Encrypt EXAMPLE_DATA using Raw RSA Keyring
211-
ciphertext_keyring, enc_header_keyring = client.encrypt(
211+
ciphertext_keyring, encrypted_header_keyring = client.encrypt(
212212
source=EXAMPLE_DATA,
213213
keyring=raw_rsa_keyring,
214214
encryption_context=DEFAULT_ENCRYPTION_CONTEXT
215215
)
216216

217217
# 2b. Encrypt EXAMPLE_DATA using Raw RSA Master Key Provider
218-
ciphertext_mkp, enc_header_mkp = client.encrypt(
218+
ciphertext_mkp, encrypted_header_mkp = client.encrypt(
219219
source=EXAMPLE_DATA,
220220
key_provider=raw_rsa_master_key_provider,
221221
encryption_context=DEFAULT_ENCRYPTION_CONTEXT
@@ -246,7 +246,7 @@ def migration_raw_rsa_key(
246246
# includes all key pairs from the encrypt operation. (The SDK can add pairs, so don't require an exact match.)
247247
assert all(
248248
pair in decrypted_header_keyring_using_mkp.encryption_context.items()
249-
for pair in enc_header_keyring.encryption_context.items()
249+
for pair in encrypted_header_keyring.encryption_context.items()
250250
)
251251

252252
assert decrypted_ciphertext_keyring_using_keyring == decrypted_ciphertext_keyring_using_mkp \
@@ -273,7 +273,7 @@ def migration_raw_rsa_key(
273273
# includes all key pairs from the encrypt operation. (The SDK can add pairs, so don't require an exact match.)
274274
assert all(
275275
pair in decrypted_header_mkp_using_mkp.encryption_context.items()
276-
for pair in enc_header_mkp.encryption_context.items()
276+
for pair in encrypted_header_mkp.encryption_context.items()
277277
)
278278

279279
assert decrypted_ciphertext_mkp_using_keyring == decrypted_ciphertext_mkp_using_mkp \

0 commit comments

Comments
 (0)