def test_encrypt_decrypt_with_context(self): kms_client = KMS() context = {'system': 'cfn-sphere', 'env': 'test'} before = u"abcd$%&öäüß" ciphertext = kms_client.encrypt(self.key_alias, before, context) after = kms_client.decrypt(ciphertext, context) self.assertEqual(before, after)
def test_encrypt_decrypt_with_unicode_data(self): before = u"abcd$%&öäüß" kms_client = KMS() ciphertext = kms_client.encrypt(self.key_alias, before) after = kms_client.decrypt(ciphertext) self.assertEqual(before, after)
def test_encrypt_decrypt_unicode_data(self): before = u"abcd$%&öäüß" kms_client = KMS() ciphertext = kms_client.encrypt(self.key_alias, before) after = kms_client.decrypt(ciphertext) self.assertEqual(before, after)