C#: How do I generate a SecureString password?

There is a simple function to generate a secure string password:

            public static SecureString StringToSecure(string password)
            {
                var secure = new SecureString();
                foreach (char c in password)
                {
                    secure.AppendChar(c);
                }
                return secure;
            }

Comments

Popular posts from this blog

SharePoint 2013: Error updating managed account credentials

Error deploying Nintex workflow: An item with the same key has already been added