title: Node.js to c# converting
body: <p>I have this function is Node.js</p>
  
  <pre><code>// @param {BigInteger} checksum
  // @returns {Uint8Array}
  
  function checksumToUintArray(checksum) {
    var result = new Uint8Array(8);
    for (var i = 0; i &lt; 8; ++i) {
      result[7 - i] = checksum.and(31).toJSNumber();
      checksum = checksum.shiftRight(5);
    }
    return result;
  }    
  </code></pre>
  
  <p>What would be the equivalent in c#?</p>
  
  <p>I'm thinking:</p>
  
  <pre><code>    public static uint[] ChecksumToUintArray(long checksum)
      {
          var result = new uint[8];
          for (var i = 0; i &lt; 8; ++i)
          {
              result[7 - i] = (uint)(checksum &amp; 31);
              checksum = checksum &gt;&gt; 5;         
          }
          return result;
      }
  </code></pre>
  
  <p>But I'm no sure.
  My main dilemma is the "BigInteger" type (but not only).
  Any help would be appropriated.</p>