summaryrefslogtreecommitdiff
path: root/lang/python/python-bcrypt
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2023-09-29 10:42:55 +0800
committerRosen Penev <rosenp@gmail.com>2023-10-03 21:28:46 -0700
commit8620abe6ad50c7f7f1082465ef2a93f264800893 (patch)
tree2448bcd29dc79c3d81dfe494a2ac1a2468e74d5a /lang/python/python-bcrypt
parent36a473bf523581f0d5c5a2e77ed5f4ead1512def (diff)
python-bcrypt: Update to 4.0.1, add myself as maintainer
Signed-off-by: Jeffery To <jeffery.to@gmail.com> (cherry picked from commit 6b3da46777bb5d029a4933481ee5939efa7c7109)
Diffstat (limited to 'lang/python/python-bcrypt')
-rw-r--r--lang/python/python-bcrypt/Makefile12
-rw-r--r--lang/python/python-bcrypt/test.sh11
2 files changed, 18 insertions, 5 deletions
diff --git a/lang/python/python-bcrypt/Makefile b/lang/python/python-bcrypt/Makefile
index b3855a473..267f59f34 100644
--- a/lang/python/python-bcrypt/Makefile
+++ b/lang/python/python-bcrypt/Makefile
@@ -6,16 +6,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=python-bcrypt
-PKG_VERSION:=3.2.2
+PKG_VERSION:=4.0.1
PKG_RELEASE:=1
PYPI_NAME:=bcrypt
-PKG_HASH:=433c410c2177057705da2a9f2cd01dd157493b2a7ac14c8593a16b3dab6b6bfb
+PKG_HASH:=27d375903ac8261cfe4047f6709d16f7d18d39b1ec92aaf72af989552a650ebd
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-PKG_BUILD_DEPENDS:=libffi/host python-cffi/host # cffi>=1.1
+PKG_BUILD_DEPENDS:=python-setuptools-rust/host
include ../pypi.mk
include $(INCLUDE_DIR)/package.mk
@@ -27,11 +28,12 @@ define Package/python3-bcrypt
SUBMENU:=Python
TITLE:=Modern password hashing
URL:=https://github.com/pyca/bcrypt/
- DEPENDS:=+python3-light +python3-cffi
+ DEPENDS:=+python3-light $(RUST_ARCH_DEPENDS)
endef
define Package/python3-bcrypt/description
- Good password hashing for your software and your servers.
+Acceptable password hashing for your software and your servers (but you
+should really use argon2id or scrypt)
endef
$(eval $(call Py3Package,python3-bcrypt))
diff --git a/lang/python/python-bcrypt/test.sh b/lang/python/python-bcrypt/test.sh
new file mode 100644
index 000000000..9443614f4
--- /dev/null
+++ b/lang/python/python-bcrypt/test.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ "$1" = python3-bcrypt ] || exit 0
+
+python3 - << EOF
+import sys
+import bcrypt
+password = b"super secret password"
+hashed = bcrypt.hashpw(password, bcrypt.gensalt())
+sys.exit(0 if bcrypt.checkpw(password, hashed) else 1)
+EOF