Aes_encrypt and aes_decrypt

select hex(AES_ENCRYPT(‘secret message’, ‘A1A2A3A4A5A6CAFE’));

It returns → 71990030B38EB0626A4F56B32E103A8F

SELECT AES_DECRYPT(unhex(‘71990030B38EB0626A4F56B32E103A8F’), ‘A1A2A3A4A5A6CAFE’);

It returns → 73 65 63 72 65 74 20 6d 65 73 73 61 67 65

Just following the site example and not working as expected. Any isssue?

Singlestore version → 7.6.11

Hello,

I first verified that the example in the documentation works. Then I tried your example. I got an error due to the way the single quotes pasted in, but when I replaced them, this worked fine:

SELECT hex(AES_ENCRYPT(‘secret message’, ‘A1A2A3A4A5A6CAFE’));

SELECT AES_DECRYPT(unhex(‘71990030B38EB0626A4F56B32E103A8F’), ‘A1A2A3A4A5A6CAFE’);

This was in version 7.6.13

1 Like