TencentBlueKing/crypto-python-sdk

ValueError: RSA key format is not supported

Opened this issue · 1 comments

ValueError: RSA key format is not supported
from django.conf import settings
from bkcrypto.asymmetric.ciphers.rsa import RSAAsymmetricCipher

# ValueError
RSAAsymmetricCipher(private_key_string=settings.RSA_PRIV_KEY)

# Normal
RSAAsymmetricCipher(private_key_string=settings.RSA_PRIV_KEY.strip("\n"))