string Pass 01000000D08C9DDF0115 D1118C7A00C04FC297EB 01000000B5DC49CF

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
string Pass = @"01000000D08C9DDF0115D1118C7A00C04FC297EB01000000B5DC49CF346C5441ACC9412051EEA53100000000020000000000106600000001000020000000B0BCA6C2C90D3F05AE7F43835F1CB0E8B9ECBCF351138A83B9E94228181CAC9E000000000E8000000002000020000000630621CC8DE9EBBFBE1089010AE6ABF4C531E277F18DC576E4EBDEB43C0D238110000000778F49BCC7B5CC0D032ECFAD9CD5419E4000000054FCFB5D2A46A1BD944F1A42B27C6B1A0CD19E5101DA4B4307DEBD5ECE980E3AEB62E1959060720459C2A854BA9100C9E912AC076A49D13B0B935942FDF4BF11";
byte[] data = FromHex(Pass);
byte[] Key = null;
byte[] enc = System.Security.Cryptography.ProtectedData.Unprotect(data, Key, DataProtectionScope.CurrentUser);
richTextBox1.Text = Encoding.UTF8.GetString(enc);
public static byte[] FromHex(string hex)
{
hex = hex.Replace("-", "");
byte[] raw = new byte[hex.Length / 2];
for (int i = 0; i < raw.Length; i++)
{
raw[i] = Convert.ToByte(hex.Substring(i * 2, 2), 16);
}
return raw;
}