<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Simple and secure password generation</Title>
      <Shortcut>Simpleandsecurepasswordgeneration</Shortcut>
      <Description>Simple and secure password generation [C#]</Description>
      <Author>Greg Gamble</Author>
      <HelpUrl>/PreviewSnippet.aspx?SnippetID=a68cbde9-65d0-4de4-9af7-2aa0d22f3cfc</HelpUrl>
      <SnippetTypes>
        <SnippetType>SurroundsWith</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Code Language="csharp"><![CDATA[The simplest random password generation scheme with ASP.NET is to return a portion of a GUID. A GUID is a Globally Unique ID, a 128-bit number that can be quickly generated with one method call, producing a hexidecimal string that can be used as a random password. To create a new GUID, use the System.Guid structure's NewGuid() method. Then, the .ToString() method can be used to create a string version of this. Here's some example code:
Result = System.Guid.NewGuid().ToString();]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>