标签归档:sha-1

[原]php版md5,sha-1哪个更快

一般随机密码都是rand()出来的,我就偷懒直接拿md5,sha-1这些函数来算了:

经过测试,md5比sha1快(废话 – -):

function

with substr and rand

only function
md5

1.94637799263

1.79774594307
sha-1

2.12755990028

1.97592806816