{"action":"created","issue":{"url":"https://api.github.com/repos/RogueException/Discord.Net/issues/104","repository_url":"https://api.github.com/repos/RogueException/Discord.Net","labels_url":"https://api.github.com/repos/RogueException/Discord.Net/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/RogueException/Discord.Net/issues/104/comments","events_url":"https://api.github.com/repos/RogueException/Discord.Net/issues/104/events","html_url":"https://github.com/RogueException/Discord.Net/issues/104","id":163686277,"number":104,"title":"Add DiscordClient.Connect(SecureString) and DiscordClient.Connext(string, SecureString) overload.","user":{"login":"HoLLy-HaCKeR","id":13605369,"avatar_url":"https://avatars.githubusercontent.com/u/13605369?v=3","gravatar_id":"","url":"https://api.github.com/users/HoLLy-HaCKeR","html_url":"https://github.com/HoLLy-HaCKeR","followers_url":"https://api.github.com/users/HoLLy-HaCKeR/followers","following_url":"https://api.github.com/users/HoLLy-HaCKeR/following{/other_user}","gists_url":"https://api.github.com/users/HoLLy-HaCKeR/gists{/gist_id}","starred_url":"https://api.github.com/users/HoLLy-HaCKeR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HoLLy-HaCKeR/subscriptions","organizations_url":"https://api.github.com/users/HoLLy-HaCKeR/orgs","repos_url":"https://api.github.com/users/HoLLy-HaCKeR/repos","events_url":"https://api.github.com/users/HoLLy-HaCKeR/events{/privacy}","received_events_url":"https://api.github.com/users/HoLLy-HaCKeR/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-04T14:17:49Z","updated_at":"2016-07-04T14:18:32Z","closed_at":null,"body":"SecureString is a .NET type that should be used to store sensitive data such as passwords, and prevents memory attacks. It's msdn documentation can be found [here](https://msdn.microsoft.com/en-us/library/system.security.securestring(v=vs.110).aspx).\r\n\r\nExample code to convert a SecureString back to a string:\r\n`public static string ConvertToUnsecureString(this SecureString securePassword)\r\n{\r\n    if (securePassword == null)\r\n        return \"\";\r\n\r\n    IntPtr unmanagedString = IntPtr.Zero;\r\n    try\r\n    {\r\n        unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(securePassword);\r\n        return Marshal.PtrToStringUni(unmanagedString);\r\n    }\r\n    finally\r\n    {\r\n        Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString);\r\n    }\r\n}`\r\n\r\nThe new overload should allow for the plaintext password or bot token to be in memory for the least amount of time.\r\nCall me paranoid, but I think this would be a nice feature to have."},"comment":{"url":"https://api.github.com/repos/RogueException/Discord.Net/issues/comments/230300856","html_url":"https://github.com/RogueException/Discord.Net/issues/104#issuecomment-230300856","issue_url":"https://api.github.com/repos/RogueException/Discord.Net/issues/104","id":230300856,"user":{"login":"HoLLy-HaCKeR","id":13605369,"avatar_url":"https://avatars.githubusercontent.com/u/13605369?v=3","gravatar_id":"","url":"https://api.github.com/users/HoLLy-HaCKeR","html_url":"https://github.com/HoLLy-HaCKeR","followers_url":"https://api.github.com/users/HoLLy-HaCKeR/followers","following_url":"https://api.github.com/users/HoLLy-HaCKeR/following{/other_user}","gists_url":"https://api.github.com/users/HoLLy-HaCKeR/gists{/gist_id}","starred_url":"https://api.github.com/users/HoLLy-HaCKeR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HoLLy-HaCKeR/subscriptions","organizations_url":"https://api.github.com/users/HoLLy-HaCKeR/orgs","repos_url":"https://api.github.com/users/HoLLy-HaCKeR/repos","events_url":"https://api.github.com/users/HoLLy-HaCKeR/events{/privacy}","received_events_url":"https://api.github.com/users/HoLLy-HaCKeR/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T14:18:32Z","updated_at":"2016-07-04T14:18:32Z","body":"Need to add Feature Request tag."}}
{"actor":{"display_login":"HoLLy-HaCKeR"}}