Encrypt a string as a extension method. It uses RSA Standard algorithm to do this.
Method: Encrypt
[Command("Enc")]publicclassEncryptExtension_Command:ICommand{ [CommandOption("enc",'e', Description ="Value that has to be encrypt")]publicstring Value { get; set; } [CommandOption("key",'k', Description ="Key used to encrypt or Decrypt.")]publicstring Key { get; set; }publicValueTaskExecuteAsync(IConsole console) {string encryptedValue =Value.Encrypt(Key);console.Output.WriteLine($"Plan Text : {Value} Encrypted Value : {encryptedValue} Key : {Key}");returndefault; }}