diff --git a/security/Makefile b/security/Makefile index c8bd6d12caa5..94312e7e62b3 100644 --- a/security/Makefile +++ b/security/Makefile @@ -1089,6 +1089,7 @@ SUBDIR += py-shamir-mnemonic SUBDIR += py-signedjson SUBDIR += py-signxml + SUBDIR += py-siphash24 SUBDIR += py-slip10 SUBDIR += py-social-auth-core SUBDIR += py-spake2 diff --git a/security/py-siphash24/Makefile b/security/py-siphash24/Makefile new file mode 100644 index 000000000000..4951c7ecd261 --- /dev/null +++ b/security/py-siphash24/Makefile @@ -0,0 +1,31 @@ +PORTNAME= siphash24 +DISTVERSION= 1.8 +CATEGORIES= security devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= python@FreeBSD.org +COMMENT= Streaming-capable SipHash-1-3 and SipHash-2-4 Implementation +WWW= https://pypi.org/project/siphash24/ + +LICENSE= APACHE20 LGPL21+ +LICENSE_COMB= dual +LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSES/Apache-2.0.txt +LICENSE_FILE_LGPL21+ = ${WRKSRC}/LICENSES/LGPL-2.1-or-later.txt + +BUILD_DEPENDS= ${LOCALBASE}/include/c-stdaux.h:devel/c-stdaux \ + ${PYTHON_PKGNAMEPREFIX}meson-python>=0.18.0:devel/meson-python@${PY_FLAVOR} +LIB_DEPENDS= libcsiphash-1.so:security/c-siphash + +USES= compiler:c11 pkgconfig python +USE_PYTHON= autoplist concurrent cython pep517 pytest + +TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} + +BINARY_ALIAS= cython=cython-${PYTHON_VER} + +do-test: + (cd ${WRKSRC} && \ + ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ./test.py) + +.include diff --git a/security/py-siphash24/distinfo b/security/py-siphash24/distinfo new file mode 100644 index 000000000000..dd1b0eefa51a --- /dev/null +++ b/security/py-siphash24/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1776312955 +SHA256 (siphash24-1.8.tar.gz) = aa932f0af4a7335caef772fdaf73a433a32580405c41eb17ff24077944b0aa97 +SIZE (siphash24-1.8.tar.gz) = 19946 diff --git a/security/py-siphash24/pkg-descr b/security/py-siphash24/pkg-descr new file mode 100644 index 000000000000..09e798619451 --- /dev/null +++ b/security/py-siphash24/pkg-descr @@ -0,0 +1,4 @@ +This module provides a C-based implementation of SipHash with an interface +compatible with the hash functions provided by the hashlib standard library +module. SipHash-1-3 and SipHash-2-4 variants are currently implemented. The +module documentation provides a detailed description of the API.