title: Android generating a hash string sha256
body: <p>I'm trying to encrypt a url-request, username and password, then post it to a webpage.</p>
  
  <p>But for some reason eclipse is saying the syntax is wrong, what am I doing wrong?
  It is the bit at the bottom where it says <code>md.update</code> that is causing errors.</p>
  
  <p>Here's my code so far: </p>
  
  <pre><code>private static final String apiKey = "38m8nyev284nddci49940303094"; 
  private static final String apiUser = "esdt34ds"; 
  
  long unixTimeStamp = System.currentTimeMillis() / 1000L;
  
  String newFeedRequest = "1.0/evoStructure?timestamp=" + unixTimeStamp;
  String fixturesFeedURL = "https://secure.website.com/_services/api/" + newFeedRequest;
  
  MessageDigest md = MessageDigest.getInstance("SHA-256");
  
  
  md.update(fixturesFeedURL.getBytes("UTF-8"),apiKey.getBytes("UTF-8"),apiUser.getBytes("UTF-8")); // Change this to "UTF-16" if needed
  byte[] digest = md.digest();
  </code></pre>
  
  <p>Here is the error I am getting:</p>
  
  <blockquote>
    <p>Multiple markers at this line</p>
    
    <ul>
    <li>Syntax error, insert "Type VariableDeclaratorId" to complete FormalParameterList</li>
    <li>Syntax error on token "update", Identifier expected after this token</li>
    <li>Syntax error on tokens, AnnotationName expected instead</li>
    <li>Syntax error on token ",", @ expected</li>
    <li>Syntax error on token ",", @ expected</li>
    </ul>
  </blockquote>