How long is the SHA256 hash?

前端 未结 5 1704
梦谈多话
梦谈多话 2020-12-02 05:44

I\'m going to run SHA256 on a password + salt, but I don\'t know how long to make my VARCHAR when setting up the MySQL database. What is a good len

5条回答
  •  自闭症患者
    2020-12-02 06:02

    Encoding options for SHA256's 256 bits:

    1. Base64: 6 bits per char = CHAR(44) including padding character
    2. Hex: 4 bits per char = CHAR(64)
    3. Binary: 8 bits per byte = BINARY(32)

提交回复
热议问题