mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
[NEW] security/py-argon2-cffi: Secure Argon2 password hashing algorithm
Argon2 won the Password Hashing Competition and argon2_cffi is the simplest way to use it in Python and PyPy: passlib 1.7.0 and later offers Argon2 support using this library too. WWW: https://argon2-cffi.readthedocs.io/
This commit is contained in:
parent
08110940c7
commit
cabc32bb88
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=503350
5 changed files with 75 additions and 0 deletions
|
@ -854,6 +854,7 @@
|
|||
SUBDIR += py-YubiOTP
|
||||
SUBDIR += py-acme
|
||||
SUBDIR += py-acme-tiny
|
||||
SUBDIR += py-argon2-cffi
|
||||
SUBDIR += py-artifacts
|
||||
SUBDIR += py-asyncssh
|
||||
SUBDIR += py-backports.ssl_match_hostname
|
||||
|
|
43
security/py-argon2-cffi/Makefile
Normal file
43
security/py-argon2-cffi/Makefile
Normal file
|
@ -0,0 +1,43 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= argon2-cffi
|
||||
PORTVERSION= 19.1.0
|
||||
CATEGORIES= security python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= koobs@FreeBSD.org
|
||||
COMMENT= Secure Argon2 password hashing algorithm
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.0.0:devel/py-cffi@${PY_FLAVOR}
|
||||
LIB_DEPENDS= libargon2.so:security/libargon2
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.0.0:devel/py-cffi@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}
|
||||
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}hypothesis>0:devel/py-hypothesis@${PY_FLAVOR}
|
||||
|
||||
USES= python localbase
|
||||
USE_PYTHON= autoplist distutils
|
||||
|
||||
MAKE_ENV+= ARGON2_CFFI_USE_SYSTEM=1
|
||||
|
||||
PYDISTUTILS_BUILD_TARGET= build_ext
|
||||
PYDISTUTILS_BUILDARGS+= --inplace
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/argon2/*.so
|
||||
|
||||
do-test:
|
||||
@cd ${WRKSRC} && PYTHONPATH=src ${PYTHON_CMD} -m pytest -v -rs
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${PYTHON_VER} < 3.4
|
||||
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}enum34>0:devel/py-enum34@${PY_FLAVOR}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
3
security/py-argon2-cffi/distinfo
Normal file
3
security/py-argon2-cffi/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1559532624
|
||||
SHA256 (argon2_cffi-19.1.0.tar.gz) = 81548a27b919861040cb928a350733f4f9455dd67c7d1ba92eb5960a1d7f8b26
|
||||
SIZE (argon2_cffi-19.1.0.tar.gz) = 1808120
|
|
@ -0,0 +1,22 @@
|
|||
# Disable deadline on test_argument_ranges
|
||||
# https://github.com/hynek/argon2_cffi/pull/52
|
||||
|
||||
--- tests/test_low_level.py.orig 2018-06-17 05:51:36 UTC
|
||||
+++ tests/test_low_level.py
|
||||
@@ -5,7 +5,7 @@ import os
|
||||
|
||||
import pytest
|
||||
|
||||
-from hypothesis import assume, given
|
||||
+from hypothesis import assume, given, settings
|
||||
from hypothesis import strategies as st
|
||||
|
||||
from argon2.exceptions import (
|
||||
@@ -253,6 +253,7 @@ class TestVerify(object):
|
||||
hash_len=st.integers(lib.ARGON2_MIN_OUTLEN, 513),
|
||||
salt_len=st.integers(lib.ARGON2_MIN_SALT_LENGTH, 513),
|
||||
)
|
||||
+@settings(deadline=None)
|
||||
def test_argument_ranges(
|
||||
password, time_cost, parallelism, memory_cost, hash_len, salt_len
|
||||
):
|
6
security/py-argon2-cffi/pkg-descr
Normal file
6
security/py-argon2-cffi/pkg-descr
Normal file
|
@ -0,0 +1,6 @@
|
|||
Argon2 won the Password Hashing Competition and argon2_cffi is the simplest
|
||||
way to use it in Python and PyPy:
|
||||
|
||||
passlib 1.7.0 and later offers Argon2 support using this library too.
|
||||
|
||||
WWW: https://argon2-cffi.readthedocs.io/
|
Loading…
Add table
Reference in a new issue