Longer strings are not supported
praus opened this issue · comments
Hi! I just wanted to drop a friendly note that your library won't be able to encrypt strings longer than the key modulus size in bytes minus padding size (11 bytes for PKCS #1). For example, if your RSA key is 2048 bit long (therefore its modulus is 2048 bits/256 bytes), you will only be able to encrypt plaintexts that are 245 bytes in length or less. RSACryptoServiceProvider will throw CryptographicException when the plaintext is too long. You might want to point this out in the documentation.
Useful links:
Thanks for the pointer, @praus !!! I'll add it to the documentation!
Added here! Thanks again!