title: SHA 256 from Java to C#
body: <p>I´m trying to create the equivalent code from Java to C# for the function below:</p>
  
  <pre><code>public static String SHA256 (List&lt;String&gt; parametros, String clave) 
  
  {
  try {
      MessageDigest sha = MessageDigest.getInstance("SHA-256");
      for(String param:parametros){
          byte p[] = new byte[param.length()];
          p = param.getBytes();
          sha.update(p);
      }
      byte bClave[] = new byte[clave.length()];
      bClave = clave.getBytes();
      byte[] hash = sha.digest(bClave);
      return ( hexString256 (hash));
     }catch (NoSuchAlgorithmException e){
     return ("Error");
    }
  }
  </code></pre>
  
  <p>Any suggestions for the  <code>sha.update(p);</code> line?</p>