[Info-ingres] decrypt of encrypted integers failes with E_US100F

Martin Bowes martin.bowes at ndph.ox.ac.uk
Mon Apr 4 10:04:09 UTC 2016


Hi All,

This works:
select aes_decrypt(aes_encrypt('tom, dick and harry!', 'FUNNY'), 'FUNNY');
The string is easily converted into a varbyte() encrypted and then decrypted.

This doesn't work:
select cast(aes_decrypt(aes_encrypt(cast(1 as byte(4)), 'FUNNY') , 'FUNNY') as integer4);

Now I thought I'd handled the conversion in aes_encrypt() of the integer into a varbyte. I was pretty sure the output (varbyte) from aes_decrypt being wrapped in a cast to integer4 should have been cool.

But it fails with: E_US100F String cannot be converted to numeric due to incorrect syntax.

What have I done wrong?

Martin Bowes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20160404/b5877fee/attachment.html>


More information about the Info-ingres mailing list