wiki:PythonDev

Version 1 (modified by tracme, 10个月 ago) ( 差异 )

--

Python Dev

import hashlib with open(passwordfile, 'w', encoding='utf-8') as f:

prefix = '%s:%s:' % (username, realm) value = (prefix + password).encode('utf-8') line = prefix + hashlib.md5(value).hexdigest() print(line, file=f)

Note: See TracWiki for help on using the wiki.