Differences
This shows you the differences between the selected revisions of the page.
2016-11-21 | 2017-11-30 | ||
using ps> interwiki link (martin) | code wrapping for new design (martin) | ||
Line 150: | Line 150: | ||
<code csharp> | <code csharp> | ||
string hex = ConfigurationManager.AppSettings["Password"]; | string hex = ConfigurationManager.AppSettings["Password"]; | ||
- | byte[] bytes = Enumerable.Range(0, hex.Length / 2).Select(x => Convert.ToByte(hex.Substring(x * 2, 2), 16)).ToArray(); | + | byte[] bytes = |
+ | ···Enumerable.Range(0, hex.Length / 2). | ||
+ | ········Select(x => Convert.ToByte(hex.Substring(x * 2, 2), 16)).ToArray(); | ||
byte[] decrypted = ProtectedData.Unprotect(bytes, null, DataProtectionScope.CurrentUser); | byte[] decrypted = ProtectedData.Unprotect(bytes, null, DataProtectionScope.CurrentUser); | ||
sessionOptions.Password = Encoding.Unicode.GetString(decrypted); | sessionOptions.Password = Encoding.Unicode.GetString(decrypted); |