Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update column with encrypted failed with TypeError #36

Open
vagarwal77 opened this issue Jan 7, 2021 · 0 comments
Open

Update column with encrypted failed with TypeError #36

vagarwal77 opened this issue Jan 7, 2021 · 0 comments

Comments

@vagarwal77
Copy link

Following this article and got an error - https://techsboot.com/blogs/redshift/encrypt_decrypt_udf_using_pyaes/
UPDATE secure_edw_t.emp_secure
SET emp_name_enc = udf_enc.aes_encrypt(emp_name, LPAD('empnameKey/fhci4=dnv73./xorb3f05', 32, 'z')),
emp_phone_enc = udf_enc.aes_encrypt(emp_phone, LPAD('empphoneKey29s0vne03]jv023n=bn34', 32, 'z'))
;

select * from svl_udf_log
13030 TypeError: object of type 'int' has no len() 2021-01-07 19:35:10 line 7, in aes_encrypt\n File "aes.py", line 557, in init\n AESBlockModeOfOperation.init(self, key)\n File "aes.py", line 304, in init\n self._aes = AES(key)\n File "aes.py", line 133, in init\n if len(key) not in (16, 24, 32):\n aes_encrypt 0 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant