Gitiles
Code Review
Sign In
192.168.1.100
/
T108
/
e958203796650e3959a43708d67534bf36f4c83b
/
.
/
external
/
subpack
/
lang
/
python
/
python-cryptography
/
test.sh
blob: 308f5456b8681ff1cac753682fa7f8893b1de4e3 [
file
] [
log
] [
blame
]
#!/bin/sh
[
"$1"
=
python3
-
cryptography
]
||
exit
0
python3
-
<<
'EOF'
from cryptography
.
fernet import
Fernet
key
=
Fernet
.
generate_key
()
f
=
Fernet
(
key
)
msg
=
b
"my deep dark secret"
token
=
f
.
encrypt
(
msg
)
assert f
.
decrypt
(
token
)
==
msg
EOF