[Info-ingres] decrypt of encrypted integers failes with E_US100F
Martin Bowes
martin.bowes at ndph.ox.ac.uk
Mon Apr 4 11:34:49 UTC 2016
Done.
Marty
From: Ian Kirkham [mailto:Ian.Kirkham at actian.com]
Sent: 04 April 2016 11:56
To: Martin Bowes; info-ingres at lists.planetingres.org
Subject: RE: [Info-ingres] decrypt of encrypted integers failes with E_US100F
Hi Marty,
The reason this is not working is that there is a missing function definition; It seems that we have no integer cast defined that will properly handle byte/varbyte - please raise a bug.
Regards,
Ian
From: info-ingres-bounces at lists.planetingres.org<mailto:info-ingres-bounces at lists.planetingres.org> [mailto:info-ingres-bounces at lists.planetingres.org] On Behalf Of Martin Bowes
Sent: 04 April 2016 11:04
To: info-ingres at lists.planetingres.org<mailto:info-ingres at lists.planetingres.org>
Subject: [Info-ingres] decrypt of encrypted integers failes with E_US100F
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/ed0c8a70/attachment.html>
More information about the Info-ingres
mailing list