文章列表
原文 http://www.iteye.com/topic/1127277
python实现
#!/usr/bin/env python
#coding:utf-8
import random
import hashlib
DIGEST_LEN = 16
def generate(password):
salt = '%0*d%0*d' % (8, random.randint(0, 99999999), 8, random.randint(0, 99999999))
password = hashlib.md5(str(password)+salt ...