支持委托的密码哈希函数
makwa的Python项目详细描述
makwa是thomas pornin设计的密码哈希函数。这个实现是在纯python中实现的,没有第三方依赖关系。从Passwords14 Slides:
Makwa is a candidate to the Password Hashing Competition. Main characteristics: * based on modular arithmetics * CPU-only cost (not memory-hard) * algebraic structure enables advanced features: offline work * factor increase, fast path, escrow * can be delegated * named after the Ojibwe name for the American black bear
安装
pip install makwa
用法
frommakwaimporthashpw,checkpwhashed_pw=hashpw(password,n,h=<hashfunction>,salt=<optionalsalt>,work_factor=<rounds>,pre_hash=<True|False>,post_hash=<length|None>)# returns a booleanis_valid=checkpw(password,hashed_pw,n,h=<hashfunction>)