Browse Source

feat: add requirements.txt

master
xuxiaofei 4 years ago
parent
commit
f77e608a34
  1. 3
      .vscode/settings.json
  2. 16
      common/utils/aes.py
  3. 4
      requirements.txt

3
.vscode/settings.json

@ -0,0 +1,3 @@
{
"python.linting.pylintEnabled": true
}

16
common/utils/aes.py

@ -47,11 +47,11 @@ pc = prpcrypt(settings.CRYPT_KEY.encode('utf8')) #初始化密钥
if __name__ == '__main__':
# for test
print(settings.CRYPT_KEY)
pc = prpcrypt(settings.CRYPT_KEY.encode('utf8')) #初始化密钥
import sys
str = sys.argv[1]
e = pc.encrypt(str) #加密
print("加密:",e)
d = pc.decrypt(e) #解密
print("解密:",d)
print(settings.CRYPT_KEY)
pc = prpcrypt(settings.CRYPT_KEY.encode('utf8')) #初始化密钥
import sys
str = sys.argv[1]
e = pc.encrypt(str) #加密
print("加密:",e)
d = pc.decrypt(e) #解密
print("解密:",d)

4
requirements.txt

@ -0,0 +1,4 @@
Django==3.0.4
pycryptodome==3.9.8
django-cors-headers==3.2.1
mysqlclient==1.3.13
Loading…
Cancel
Save