缓存加密 cipher 对象
(public_key: str)
| 93 | |
| 94 | @lru_cache(maxsize=2) |
| 95 | def _get_encrypt_cipher(public_key: str): |
| 96 | """缓存加密 cipher 对象""" |
| 97 | return PKCS1_cipher.new(RSA.importKey(extern_key=public_key, passphrase=secret_code)) |
| 98 | |
| 99 | |
| 100 | def rsa_long_encrypt(message, public_key: str | None = None, length=200): |
no outgoing calls
no test coverage detected