Differences
This shows you the differences between the selected revisions of the page.
| 2016-11-23 | 2017-11-30 | ||
| Restored revision 1479719906. Undoing revision 1479892947. (martin) (hidden) | 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); | ||