php电子邮件确认代码算法?

标签 php algorithm confirmation-email

我在数据库表中看到一个“confirm_code”列,该列的属性是varchar(100), 你们能给我一个好的确认代码算法的想法吗?基本上,它应该由随机字符组成。在我看来,最简单的事情就是通过 md5sha1 加密字符串,但由于当前的列属性,它不适合。

最佳答案

md5 散列应该很容易适合 varchar(100)...以十六进制形式,MD5 散列是 typically 32 characters long .

关于php电子邮件确认代码算法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2197879/

相关文章:

javascript - 使用 jQuery 获取 php 的结果

php - 如何测试 PHPUnit 模拟对象中的第二个参数

php - 带条件的 MySQL 查询

algorithm - 数据集中的组检测

ruby-on-rails - Rails 设计 : "You need to sign in or sign up before continuing" instead of "You will receive an email with instructions.."

registration - 我们为什么要发送确认电子邮件?

php - 为什么这个 <a> 标签上的 `background-image` 不可见?

c - 设计一个支持海量数据存储和查询的系统

algorithm - 运行总和最大项最小化

php - Symfony2 FosuserBundle : RE-send registration confirmation email