Does anyone know how/where can we apply to a column, a md5 encryption.
I'm creating a user password table and on the password column I would like to apply md5 encryption.
Thanks in advance.
Taken from mysql workbench manual:
It is possible to enter a function, or other expression, into a field. Use the prefix \func to prevent MySQL Workbench from escaping quotation marks. For example, for the expression md5('fred'), MySQL Workbench normally would generate the code md5(\'fred\'). To prevent this, enter the expression as \func md5('fred') to ensure that the quoting is not escaped.
There's an 'md5()' function that when given a string will return a string of 32 hex digits. Just create a column of char(32) to hold it should do the trick.
See documentation.
In terms of using this within MySql workbench, I don't think it's possible to mark a column to contain an md5 hash explicitly as really you can simply put an md5 hash in a char column as mentioned above. I don't believe that you can have a column implicitly perform the md5 function call on an inserted string in this fashion. (I could be wrong).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With