FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » problem encrypting data (AES_ENCRYPT/AES_DECRYPT)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
OT: MySQL AES_ENCRYPT/AES_DECRYPT (was: Re: problem encrypting data (AES_ENCRYPT/AES_DECRYPT)) [message #181814 is a reply to message #181768] Wed, 05 June 2013 12:51 Go to previous message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma:
Senior Member
Am 30.05.2013 16:38, schrieb ViVi:

> i'm definetly a moron:
> i've defined the encrypted field too short:
> `categoria_nome` varbinary(30) DEFAULT NULL,
> and every string longer than 15 chars was corrupted.
> ...
> ..
> .
> sorry for the disturb, and please don't be too rude
> :-(

Nobody's perfect ;-)

JFTR:

< http://dev.mysql.com/doc/refman/4.1/en/encryption-functions.html#function_a es-encrypt>

Cite:

"Because AES is a block-level algorithm, padding is used to encode
uneven length strings and so the result string length may be calculated
using this formula:

16 * (trunc(string_length / 16) + 1)

If AES_DECRYPT() detects invalid data or incorrect padding, it returns
NULL. However, it is possible for AES_DECRYPT() to return a non-NULL
value (possibly garbage) if the input data or the key is invalid."


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: I am having some difficulties with Tooltip...
Next Topic: bug in is_numeric
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Feb 17 07:33:40 GMT 2025

Total time taken to generate the page: 0.03679 seconds