travist / jsencrypt

A zero-dependency Javascript library to perform OpenSSL RSA Encryption, Decryption, and Key Generation.
http://www.travistidwell.com/jsencrypt
Other
6.68k stars 2.02k forks source link

Help regarding migrating from an older version of jsencrypt #276

Open ChrisMGeo opened 2 years ago

ChrisMGeo commented 2 years ago

JSEncryptRSAKey has the property n inherited from RSAKey. When trying to migrate from ^3.0.0-rc.1 to use TypeScript, this n is protected. Any way I can read this property in the current version of jsencrypt? The code in which I need to access n is:

var maxLength = (key.n.bitLength() + 7) >> 3;