title: Why do RNGCryptoServiceProvider values always end with equals signs?
body: <p>Here is my method:</p>
  
  <pre><code>public static string GenerateRandomString(int bytes)
  {
      var rng = new RNGCryptoServiceProvider();
      var randomBytes = new byte[bytes];
      rng.GetBytes(randomBytes);
      return Convert.ToBase64String(randomBytes);
  }
  </code></pre>
  
  <p>Every value generated:</p>
  
  <p>i.e.:</p>
  
  <pre><code>Qcr6OgNxkGzVebNl00Dtk7yCaz64owUx7pKEhl1Ogn4=
  IGFLQB0OrReDB3P6nuZgqZIkTwTtch9Fk3Rx/DL4CgI=
  UAJwLwIPYEJ9SzMAK/EMiUJ/DHhmfy6UVMM5MU6Dcpg=
  </code></pre>
  
  <p>always ends with "=" - why is this?</p>
  
  <p>I'm sending this as a random string for a password reset email and am having issues with Microsoft Outlook not picking up the = at the end of the link. Is anyone aware of a way around this without simply chopping off the last character of the string?</p>