Redshift UDF AES ENCRYPT – No hay un módulo llamado Crypto.Cipher._mode_ecb
BIBLIOTECA create library pycryptodome language plpythonu from ‘s3://aws_python/library/pycryptodome/pycryptodome.zip’ credentials ‘aws_iam_role’ region as ‘aws-region’; FUNCIÓN CREATE OR REPLACE FUNCTION test.aes_encrypt(input varchar(max)) RETURNS varchar(max) STABLE AS ‘ if input is None: return None import pycryptodome encrypt=True secret_key = b”abcdefghijklmnop” remainder = len(secret_key) % 16 modified_key = secret_key.ljust(len(secret_key) + (16 – remainder))[:32] remainder = len(input) % 16 modified_text […]