using System.Security.Cryptography;Decrypting:
...
string password;
string encryptedPassword = Convert.ToBase64String(
ProtectedData.Protect(Encoding.UTF8.GetBytes(password), null,
DataProtectionScope.CurrentUser));
using System.Security.Cryptography;
...
string encryptedPassword;
string password = Encoding.UTF8.GetString(ProtectedData.Unprotect(
Convert.FromBase64String(encryptedPassword), null,
DataProtectionScope.CurrentUser))
1 comment:
That code is really nice and i am looking for the same code from many days.thanks for sharing wonderful information and code with us.
Post a Comment