title: node.js how to repreduce PHP MD5 encryption
body: <p>I'm converting an existing php based website to a node.js app, and I need to reproduce this encryption method from php to js.</p>
  
  <pre><code>private static $_passwordSalt = 'd2g6IOP(U(&amp;Â§)%UÂ§VUIPU(HN%V/Â§Â§URerjh0Ã¼rfqw4zoÃ¶qe54gÃŸ0Ã¤Q"LOU$3wer';
  public static function getCryptedPassword($password = 'password') {
      return sha1(md5(self::$_passwordSalt.$password));
  }
  </code></pre>
  
  <p>So far I've tried this but it does not return the same results:</p>
  
  <pre><code>UserSchema.methods.hashPassword = function(password) {
          var salt = 'd2g6IOP(U(&amp;Â§)%UÂ§VUIPU(HN%V/Â§Â§URerjh0Ã¼rfqw4zoÃ¶qe54gÃŸ0Ã¤Q"LOU$3wer'
          var md5Hash = md5(password + salt);
          var hash = sha1(md5Hash);
          return hash;
  };
  </code></pre>