Should I create the password column as a regular varchar and then insert like this:

sha1($pass_string)

Or should I do something extra upon the creation of the table to make sure that password field is secure?

Thanks!

解决方案

It's a normal varchar field (40 characters) but if you want to set it more secure you should use salt.

Update :

WARNING : Hash password without salt is REALLY WEAK ! You should never use it !!

Password salting is the good way for doing it :

password salting

as adviced by pst :

using SHA-1 and salt is the more naive but quite well secure approach.

using bcrypt :

it's the more secure approach :) because it use speed in order to make it more secure, bfish is a hash function built around the encryption method blowfish. (Seems than twofish exists too and should be the "modern" version of blowfish).

It's a version using a chain of SHA-1 so it's a intermediate solution, but allowing to set speed to your needs. In fact speed make weaker your security.

mysql密码字段_如何在mysql中创建带有密码字段的表?相关推荐

  1. mysql 生成日历表_如何在SQL中创建100年的日历表

    下面是可以在SQL Server中使用的通用脚本.只需修改开始日期和结束日期: IF EXISTS (SELECT * FROM information_schema.tables WHERE Tab ...

  2. python tkinter frame滚动条_如何在Tkinter中创建带有滚动条的LabelFrame?

    我正在使用Python和Tkinter为我正在编写的程序创建一个GUI,我遇到了一些问题. 我有三个从LabelFrame派生的对象在一个从Frame派生的对象中.LabelFrame子代之一是对应的 ...

  3. linux中更改用户密码_如何在Linux中更改用户密码

    linux中更改用户密码 In this tutorial, we will focus on how you can change a user's password in Linux. We wi ...

  4. access自动编号怎么解除_如何在 Access 中重置“自动编号”字段值

    如何在 Access 中重置"自动编号"字段值 中删除某个表中的一些行或所有行时,"自动编号"字段不会自动重置.要重置"自动编号"字段值并 ...

  5. html树状图右侧_如何在 Tableau 中创建控制图?

    本文作者:Jose Valero 控制图是用于研究流程如何随时间变化,并确定制造或业务流程是否在统计控制状态下的图表. 我相信这对每家公司来说都是一个有益的工具,所以在这篇文章中,我将尝试如何在 Ta ...

  6. wordpress创建_如何在WordPress中创建问卷(简易方式)

    wordpress创建 Do you want to create a questionnaire in WordPress to survey your visitors or collect da ...

  7. vue 递归创建菜单_如何在Vue中创建类似中等的突出显示菜单

    vue 递归创建菜单 by Taha Shashtari 由Taha Shashtari 如何在Vue中创建类似中等的突出显示菜单 (How to Create a Medium-Like Highl ...

  8. figma下载_如何在Figma中创建逼真的3D对象

    figma下载 by Gbolahan Taoheed Fawale 通过Gbolahan Taoheed Fawale 如何在Figma中创建逼真的3D对象 (How to create reali ...

  9. hive 元数据 自定义_如何在Hive中创建自定义函数UDF及如何直接通过Impala的同步元数据重用UDF的jar文件-阿里云开发者社区...

    如何在Hive中创建自定义函数UDF及使用 如何在Impala中使用Hive的自定义函数 UDF函数开发 使用Intellij工具开发Hive的UDF函数,进行编译: 1.使用Intellij工具通过 ...

  10. java 运费_如何在Java中创建运费成本计算器

    我正在创建计算器来计算运费.代码是这样的:如何在Java中创建运费成本计算器 class ShippingCalc { public static void main(String[] args) { ...

最新文章

  1. 海思osd+freetype+SDL+SDL_ttf编译成功后,Makefile的编写
  2. 切诺夫界证明(Chernoff bound)
  3. qgraphicsview鼠标移动图片_如何在中间鼠标的QGraphicsView中滚动QGraphicsScene?
  4. python词云图代码示例 无jieba_【词云图】如何用python的第三方库jieba和wordcloud画词云图...
  5. IoT与区块链的机遇与挑战
  6. 客户端到服务器的请求响应时间,客户端到服务器的网络响应时间
  7. Spring cloud——Hystrix 原理解析
  8. 从零开始学习Hadoop--第1章 Hadoop的安装
  9. vs2008使用技巧
  10. fluke196c系统语言,原装二手福禄克Fluke196C 电工仪表
  11. CentOS 6.7 配置JSP运行环境之resin
  12. vivo发布OriginOS Ocean,国产定制系统越来越好了
  13. weblogic安装
  14. oracle卸载重新安装失败,Oracle卸载重新安装——实战
  15. 语音识别技术竟然发展如此迅速
  16. Chrome 扩展程序——LastPass:密码管理工具
  17. TASK 5 ARP Cache Poisoning
  18. python判断火车票座位号分布图_火车票座位号分布图图解(是否靠窗)
  19. 电脑壁纸该换了,mac必备壁纸软件Dynamic Wallpaper
  20. 给所有想辞职的人一个大胆的建议!

热门文章

  1. 如何让您的应用程序进入苹果App Store?(上)
  2. 一张图读懂“云栖大会·武汉峰会”发布的阿里云AI产品体系
  3. [Hdu3555] Bomb(数位DP)
  4. 【USACO 2.4】Fractions to Decimals(分数转小数)
  5. WebLogic(12C)——windows下安装教程
  6. 通过共享文件夹来进行前后端独立开发
  7. Server.MapPath()用法
  8. SRv6技术研究和组网设计
  9. 在Linux上运行procmem和procrank
  10. android java程序中调用shell命令