I was doing a log in mechanism on project where i required Encryption and Decryption code
Here is the simplest method i found:
private string Encryptdata(string password)
string strmsg = string.Empty;
byte encode = new byte[password.Length];
encode = Encoding.UTF8.GetBytes(password);
strmsg = Convert.ToBase64String(encode);
private string Decryptdata(string encryptpwd)
string decryptpwd = string.Empty;
UTF8Encoding encodepwd = new UTF8Encoding();
Decoder Decode = encodepwd.GetDecoder();
byte todecode_byte = Convert.FromBase64String(encryptpwd);
int charCount = Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
char decoded_char = new char[charCount];
Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
decryptpwd = new String(decoded_char);
Original Source : http://www.aspdotnet-suresh.com/2010/12/introduction-here-i-will-explain-how-to_28.html
Recently I was working with search bar in search result page where I encounter below error: Sorry, Something went wrong An error occurred...
Recently I was working on sending mail using smtp server where I stuck on below error: IIS/SMTP - emails are stuck in mailroot/Queue ...
If you want to know which controlled fired post back at page load, here is some sample code. 1) for link button: string ctrlname = Page....