Simple RSA 2048 Public Key Encryptor Command Line Application. Works with .net framework 4.0 and above
- Encrypts given string with given RSA 2048 public key
- Converts encrypted binary to Base64 String
- Saves Base64 string as text file to given path
APPLICATION START PARAMETERS
- Text to encrypt
- XML Public Key File
- Encrpted text output
EXAMPLE
RSAEncryptor.exe "textToEncrypt" "C:\Users\gulteking\Desktop\pubKey.xml" "C:\Users\gulteking\Desktop\encryptedText.txt"
RETURN CODES
SUCCESS = 0
AN_ERROR_OCCURED_WHILE_READING_PUBLIC_KEY = -5
AN_ERROR_OCCURED_WHILE_INITIALIZING_RSA_KEY = -10
AN_ERROR_OCCURED_WHILE_ENCRYPTING_TEXT = -15
AN_ERROR_OCCURED_WHILE_WRITING_ENCRPTED_TEXT_TO_FILE = -20
SAMPLE XML PUBLIC KEY FILE
<RSAKeyValue><Modulus>MODULUS HERE</Modulus><Exponent>EXPONENT HERE</Exponent></RSAKeyValue>