computeBlock = function(index) {
    'use strict';
    // Initialize the result to be array of 0 such that its xor with the first
    // block would be the first block.
    var result = (new Array(HASH_LENGTH / 8)).fill(0);
    // Initialize the salt of the first iteration to initialSalt || i.
    var salt = initialSalt.concat(index);
    var hmac = new goog.crypt.Hmac(new goog.crypt.Sha1(), password, 64);
    // Compute and XOR each iteration.
    for (var i = 0; i < iterations; i++) {
      // The salt of the next iteration is the result of the current iteration.
      salt = hmac.getHmac(salt);
      result = goog.crypt.xorByteArray(result, salt);
    }
    return result;
  }
Compute each block of the key using HMAC-SHA1.
@param {!Array<number>} index Byte array representation of the index of
    the block to be computed.
@return {!Array<number>} Byte array representation of the output block.