What data type to use for hashed password field and what length?

后端 未结 10 1947
孤街浪徒
孤街浪徒 2020-11-22 15:47

I\'m not sure how password hashing works (will be implementing it later), but need to create database schema now.

I\'m thinking of limiting passwords to 4-20 charact

10条回答
  •  臣服心动
    2020-11-22 16:04

    I've always tested to find the MAX string length of an encrypted string and set that as the character length of a VARCHAR type. Depending on how many records you're going to have, it could really help the database size.

提交回复
热议问题