Skip to content

Commit 75c1760

Browse files
authored
[Storage] Fix typos in Blob/Queue (Azure#31622)
1 parent 2f8b759 commit 75c1760

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

sdk/storage/azure-storage-blob/azure/storage/blob/_encryption.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ def _encrypt_region(self, data: bytes) -> bytes:
254254
aesgcm = AESGCM(self.content_encryption_key)
255255

256256
# Returns ciphertext + tag
257-
cipertext_with_tag = aesgcm.encrypt(nonce, data, None)
258-
return nonce + cipertext_with_tag
257+
ciphertext_with_tag = aesgcm.encrypt(nonce, data, None)
258+
return nonce + ciphertext_with_tag
259259

260260

261261
def is_encryption_v2(encryption_data: Optional[_EncryptionData]) -> bool:
@@ -883,7 +883,7 @@ def encrypt_queue_message(message, key_encryption_key, version):
883883
Returns a json-formatted string containing the encrypted message and the encryption metadata.
884884
885885
:param object message:
886-
The plain text messge to be encrypted.
886+
The plain text message to be encrypted.
887887
:param object key_encryption_key:
888888
The user-provided key-encryption-key. Must implement the following methods:
889889
wrap_key(key)--wraps the specified key using an algorithm of the user's choice.
@@ -927,8 +927,8 @@ def encrypt_queue_message(message, key_encryption_key, version):
927927
aesgcm = AESGCM(content_encryption_key)
928928

929929
# Returns ciphertext + tag
930-
cipertext_with_tag = aesgcm.encrypt(nonce, message, None)
931-
encrypted_data = nonce + cipertext_with_tag
930+
ciphertext_with_tag = aesgcm.encrypt(nonce, message, None)
931+
encrypted_data = nonce + ciphertext_with_tag
932932

933933
else:
934934
raise ValueError("Invalid encryption version specified.")

sdk/storage/azure-storage-queue/azure/storage/queue/_encryption.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class _EncryptionData:
147147
The content encryption initialization vector.
148148
Required for AES-CBC (V1).
149149
:param Optional[_EncryptedRegionInfo] encrypted_region_info:
150-
The info about the autenticated block sizes.
150+
The info about the authenticated block sizes.
151151
Required for AES-GCM (V2).
152152
:param _EncryptionAgent encryption_agent:
153153
The encryption agent.
@@ -254,8 +254,8 @@ def _encrypt_region(self, data: bytes) -> bytes:
254254
aesgcm = AESGCM(self.content_encryption_key)
255255

256256
# Returns ciphertext + tag
257-
cipertext_with_tag = aesgcm.encrypt(nonce, data, None)
258-
return nonce + cipertext_with_tag
257+
ciphertext_with_tag = aesgcm.encrypt(nonce, data, None)
258+
return nonce + ciphertext_with_tag
259259

260260

261261
def is_encryption_v2(encryption_data: Optional[_EncryptionData]) -> bool:
@@ -883,7 +883,7 @@ def encrypt_queue_message(message, key_encryption_key, version):
883883
Returns a json-formatted string containing the encrypted message and the encryption metadata.
884884
885885
:param object message:
886-
The plain text messge to be encrypted.
886+
The plain text message to be encrypted.
887887
:param object key_encryption_key:
888888
The user-provided key-encryption-key. Must implement the following methods:
889889
wrap_key(key)--wraps the specified key using an algorithm of the user's choice.
@@ -927,8 +927,8 @@ def encrypt_queue_message(message, key_encryption_key, version):
927927
aesgcm = AESGCM(content_encryption_key)
928928

929929
# Returns ciphertext + tag
930-
cipertext_with_tag = aesgcm.encrypt(nonce, message, None)
931-
encrypted_data = nonce + cipertext_with_tag
930+
ciphertext_with_tag = aesgcm.encrypt(nonce, message, None)
931+
encrypted_data = nonce + ciphertext_with_tag
932932

933933
else:
934934
raise ValueError("Invalid encryption version specified.")

0 commit comments

Comments
 (0)