Represent MD5 hash as an integer

前端 未结 8 1913
Happy的楠姐
Happy的楠姐 2021-02-05 09:42

In my user database table, I take the MD5 hash of the email address of a user as the id.

Example: email(example@example.org) = id(d41d8cd98f00b204e9800998ecf8427e)

8条回答
  •  遥遥无期
    2021-02-05 10:11

    Why ord()? md5 produce normal 16-byte value, presented to you in hex for better readability. So you can't convert 16-byte value to 4 or 8 byte integer without loss. You must change some part of your algoritms to use this as id.

提交回复
热议问题