0

Unfortunately I have to work in rather obsolete version of cake php i.e 1.1. I need to employ mysql AES_ENCRYPT and AES_DECRYPT in it which I am unable to do so.

I was trying to do it like this

$this->data['xx']['password'] = `AES_ENCRYPT($this->data['xx']['password'],$this->pass)`;

But to know avail as it doesnt encrypts it and in this way AES_ENCRYPT doesnt comes into play . Some one please give me a heads up for this.

Thank You.

techie_28
  • 2,123
  • 4
  • 41
  • 62
  • 2
    Don't encrypt passwords. Take a salted hash instead. See [The definitive guide to forms based website authentication](http://stackoverflow.com/a/477578). – eggyal Dec 08 '12 at 09:36

1 Answers1

2

As above, you should be hashing the passwords.

http://book.cakephp.org/1.3/en/The-Manual/Core-Components/Authentication.html

See if that functionality is available as its fairly integral to cake so would be surprised if it didn't exist in 1.1. otherwise use the salts stored in your system and manually hash them.

Xis
  • 51
  • 4