Testing if string is sha1 in PHP

前端 未结 3 1130
渐次进展
渐次进展 2020-12-31 05:33

I\'m planning on storing the passwords as a sha1, so I need a way to validate that it is a sha1 at another point in my website. I was planning on using preg_match, but I do

3条回答
  •  萌比男神i
    2020-12-31 06:11

    ctype_xdigit is much faster. I typically use hashes for lookups and find it very useful.

提交回复
热议问题