diff options
| author | Jeffery To <jeffery.to@gmail.com> | 2023-09-29 10:42:55 +0800 |
|---|---|---|
| committer | Tianling Shen <cnsztl@gmail.com> | 2023-10-02 19:14:10 +0800 |
| commit | 6b3da46777bb5d029a4933481ee5939efa7c7109 (patch) | |
| tree | dfea40c7de089f58037a57c78782c2c7754c9c83 /lang/python/python-bcrypt/test.sh | |
| parent | bb278a015c6b76ca2c9fdf6663dbd7428777915e (diff) | |
python-bcrypt: Update to 4.0.1, add myself as maintainer
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/python-bcrypt/test.sh')
| -rw-r--r-- | lang/python/python-bcrypt/test.sh | 11 |
1 files changed, 11 insertions, 0 deletions
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 |
