mysql工作台md5列-如何?
有谁知道我们如何/在哪里可以应用 md5 加密列。
我正在创建一个用户密码表,并在密码列上应用 md5 加密。
提前致谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
摘自mysql工作台手册:
Taken from mysql workbench manual:
有一个“md5()”函数,当给定一个字符串时,该函数将返回一个 32 个十六进制数字的字符串。只需创建一列 char(32) 来保存它就可以了。
请参阅文档。
就在 MySql 工作台中使用它而言,我认为不可能显式标记一个列来包含 md5 哈希值,因为实际上您可以简单地将 md5 哈希值放在 char 列中,如上所述。我不相信您可以让列以这种方式对插入的字符串隐式执行 md5 函数调用。 (我可能是错的)。
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).
已经一年多了……但是如果其他人像我一样跌倒在这里:-)
事情是这样的:
整个文档此处。
More than a years now... but if someone else fall here like I did :-)
And it goes like this:
Whole doc here.
/func
东西对我不起作用。它总是忽略它并将其视为字符串。不过,我能够通过一些 SQL 注入来欺骗工作台。
编写 ( SELECT ... ) 语句就可以了。所以我把它放在我的字段中:
它用多边形对象而不是字符串填充数据库字段。
The
/func
thing didn't work for me. It was always ignoring it and treated it as a String.However I was able to trick the Workbench with some SQL-Injection.
Writing a ( SELECT ... )-statment just worked. So I put this in my field:
and it filled the databese field with the polygon-object and not the string.