I am trying to encrypt and decrypt the data using RSA 2048 with public and private keys.
Everything is working fine except one thing that, the decypted text is coming without some special characters.
I tried various ways of encoding and decoding of Base64 but couldn’t find the issue
You’re misusing your class.
Your class takes a Base64 string, not a string of arbitrary text.
Apparently, the Base64 decoder you’re using is silently stripping non-base64 characters rather than throwing an exception.
If you want to use this class with arbitrary text, you’ll need to use a Unicode encoding (typically UTF-8) to convert the text into a byte array, then convert that byte array to base64 so that the class can convert it back to a byte array.
I recommend that you change the class to a byte array directly rather than a base64 string; the current design is misleading and pointless.