Python3.7 基于 pycryptodome 的AES加密解密、RSA加密解密、加签验签
#!/usr/bin/env python
# -*- coding: utf8 -*-
import os
import rsa
import json
import hashlib
import base64
from Crypto.Cipher import AES
from ..settings_manager import settings
class RSAEncrypter(object):
"""RSA加密解密
参考 https://stuvel.eu/python-rsa-doc/index.html
对应JavaScript版本参考 https://github.com/travist/jsencrypt
[description]
"""