Search the Community
Showing results for tags 'aes_encrypt'.
I've been having trouble understanding what exactly the salt argument and its purpose are. Can someone explain it in context (give an example?)? I've also been having some trouble with step 4 in the example in the book. I'm using phpMyAdmin and when I type in the code, it says that 'nacl' is not identified. Is this normal? If so, is there a way I can get around it or do I have to use the shell? Thanks!
Hi, I have been following through the exercises in your book, and until now have been getting on fine. However I don't seem to be able to salt the password in the way described in the book in Chapter 7, page 238-239. I run the column creation queries; ALTER TABLE customers ADD COLUMN pin VARBINARY(16) NOT NULL; ALTER TABLE customers ADD COLUMN nacl CHAR(20) NOT NULL; Then I run the salt and password setting on one of the columns; UPDATE customers SET nacl = SUBSTRING(MD5(RAND()), -20) WHERE customer_id=1; UPDATE customers SET pin=AES_ENCRYPT(1234, nacl) WHERE customer_id=1;