2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-27 05:33:21 +00:00

+ Strip the tag to the requested tag_length.

+ Add GCM test.
This commit is contained in:
oleksiys
2019-08-13 23:47:06 -07:00
committed by Peter Hamilton
parent ead6c431bc
commit c2bfd3e835
2 changed files with 30 additions and 2 deletions

View File

@@ -521,7 +521,7 @@ class CryptographyEngine(api.CryptographicEngine):
if return_iv_nonce:
result['iv_nonce'] = iv_nonce
if is_gcm_mode:
result['auth_tag'] = encryptor.tag
result['auth_tag'] = encryptor.tag[:auth_tag_length]
return result
def _encrypt_asymmetric(self,
@@ -875,7 +875,7 @@ class CryptographyEngine(api.CryptographicEngine):
padding_method,
hashing_algorithm=None):
"""
Encrypt data using asymmetric decryption.
Decrypt data using asymmetric decryption.
Args:
decryption_algorithm (CryptographicAlgorithm): An enumeration