mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 06:04:31 +04:00
python-cryptography: Update to 41.0.5
This also adds a CPE ID for the package and updates the test.sh script to use an assert. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
committed by
Tianling Shen
parent
1fbe4b9a8b
commit
c4a223ed87
@@ -2,11 +2,13 @@
|
||||
|
||||
[ "$1" = python3-cryptography ] || exit 0
|
||||
|
||||
python3 - << EOF
|
||||
import sys
|
||||
python3 - << 'EOF'
|
||||
|
||||
from cryptography.fernet import Fernet
|
||||
key = Fernet.generate_key()
|
||||
f = Fernet(key)
|
||||
token = f.encrypt(b"my deep dark secret")
|
||||
sys.exit(0 if f.decrypt(token) == b"my deep dark secret" else 1)
|
||||
msg = b"my deep dark secret"
|
||||
token = f.encrypt(msg)
|
||||
assert f.decrypt(token) == msg
|
||||
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user