title: Problem with copy byte[] into another byte[]
body: <p>I have a method to create a hashed password.
  However it crashes at salt.CopyTo(pwd, 0);
  Says that the target byte[] is too small.
  How do I solve the problem?</p>
  
  <pre><code>public static byte[] CreateHashedPassword(string password, byte[] salt)
          {
              SHA1 sha1 = SHA1.Create();
              byte[] pwd = CustomHelpers.StringToByteArray(password);
              salt.CopyTo(pwd, 0);
              sha1.ComputeHash(pwd);
  
              return pwd;            
          }
  </code></pre>