JSEncrypt won't import RSA PKCS#1 public keys
JSEncrypt::setPublicKey() fails when imports RSA public key in PKCS#1 DER, encoded in Base64.
Example (public key PKCS#1):
MIGJAoGBANGZJVq9xMtDWmHP38AfS5nJ8I6P1J5FpZwOgFZvZdH5nCSLj0pOJ9hJb/hyIGBz5H+sH+jdWMrl6+FWohE2JbvL+SAQzVoliS4HAiBwsx3n8DSRdp2SDeL/9a5oeJRdbNClKAb7FtUaDdaC2G5RLccnZRn5POWhNYL95DKRibJZAgMBAAE=
causes:
Uncaught (in promise) TypeError: Cannot read property 'toString' of null
at Object.bigIntToMinTwosComplementsHex (
PKSC#8 RSA pubkeys imports normally...
JSEncrypt::setPublicKey() fails when imports RSA public key in PKCS#1 DER, encoded in Base64.
Example (public key PKCS#1):
MIGJAoGBANGZJVq9xMtDWmHP38AfS5nJ8I6P1J5FpZwOgFZvZdH5nCSLj0pOJ9hJb/hyIGBz5H+sH+jdWMrl6+FWohE2JbvL+SAQzVoliS4HAiBwsx3n8DSRdp2SDeL/9a5oeJRdbNClKAb7FtUaDdaC2G5RLccnZRn5POWhNYL95DKRibJZAgMBAAE=
causes: Uncaught (in promise) TypeError: Cannot read property 'toString' of null at Object.bigIntToMinTwosComplementsHex (:2079:25) at KJUR.asn1.DERInteger.setByBigInteger (:2493:31) at new KJUR.asn1.DERInteger (:2529:11) at JSEncryptRSAKey.RSAKey.getPublicBaseKey (:4017:7) at JSEncryptRSAKey.RSAKey.getPublicBaseKeyB64 (:4044:23) at JSEncrypt.getPublicKeyB64 (:4336:24)
PKSC#8 RSA pubkeys imports normally...
Did you dound a solution?
@dtrenin7 Did you dound a solution?
Looking for this too!
sorry guys project is too old for me)