安全argon2密码哈希算法。
argon2-cffi的Python项目详细描述
Argon2赢得了Password Hashing Competition和argon2_cffi是在python和pypy中使用它的最简单方法:
>>> fromargon2importPasswordHasher>>> ph=PasswordHasher()>>> hash=ph.hash("s3kr3tp4ssw0rd")>>> hash# doctest: +SKIP'$argon2id$v=19$m=102400,t=2,p=8$tSm+JOWigOgPZx/g44K5fQ$WDyus6py50bVFIPkjA28lQ' >>> ph.verify(hash,"s3kr3tp4ssw0rd")True >>> ph.check_needs_rehash(hash)False >>> ph.verify(hash,"t0t411ywr0ng")Traceback (most recent call last): ...argon2.exceptions.VerifyMismatchError: The password does not match the supplied hash
注意
passlib1.7.0及更高版本也提供了使用此库的Argon2 support。
argon2_cffi的文档位于Read the Docs,即GitHub上的代码。 它在Python2.7、3.4+和Pypy上进行了严格的测试。
信贷和许可证
argon2_cffi由hynek schlawack维护,并在MIT license下发布。
这项发展得到了Variomedia AG的善意支持。
作者的完整列表可以在github的overview中找到。
卖方代码
参数2
原始argon2 repo可以在https://github.com/P-H-C/phc-winner-argon2/找到。
除了下面列出的组件外,此存储库中的argon2代码版权所有(c)2015 daniel dinu、dmitry khovratovich(主要作者)、jean-philippe aumasson和samuel neves,并在CC0许可下。
src/encoding.c中的字符串编码例程是版权所有的(c)2015 Thomas Pornin,并在CC0许可下。
src/blake2/中的BLAKE2代码是版权所有(c)Samuel Neves,2013-2015,并在CC0许可下。
argon2的作者也非常有助于让库在visual studio的古代版本上编译python的古代版本。
文档还经常引用argon2paper中的内容,以通过重新措辞避免错误。
msinttypes
为了能够在visual studio 2008和visual studio 2010上编译python 2.7和3.4分别需要的代码,我们还提供了两个整数类型的c头。 它们来自msinttypes project(auto-import on GitHub),并根据新的bsd获得许可:
版权所有(c)2006-2013 Alexander Chemeris
以源和二进制形式重新分配和使用,有无 如果满足以下条件,则允许修改:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the product nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
本软件由作者“按原样”和任何明示或暗示的 担保,包括但不限于 对特定用途的适销性和适销性被驳回。在不 任何直接的,间接的,偶然的, 特殊、惩戒性或后果性损害(包括但不限于, 替代货物或服务的采购;使用、数据或利润的损失; 或营业中断),无论是何种原因,根据任何责任理论, 无论是合同、严格责任还是侵权行为(包括疏忽或 否则)以任何方式使用本软件,即使 被告知可能发生这种损害。