function hashGoldenTester(hasher, length) {
  TEST_VECTOR.forEach(data => {
    hasher.update(data.source);
    const digest = hasher.digest();
    assertEquals('Hash digest has the wrong length', length, digest.length * 8);
    if (data[length]) {
      // We're given an expected value
      const expected = crypt.hexToByteArray(data[length]);
      assertElementsEquals(
          `Wrong result for hash${length}` +
              '(\'' + data.source + '\')',
          expected, digest);
    }
    hasher.reset();
  });
}
Function called by the actual testers to ensure that specific strings
hash to specific published values.
Each item in the vector has a "source" and one or more additional keys.
If the item has a key matching the key argument passed to this
function, it is the expected value of the hash function.
@param {!crypt.Sha2_64bit} hasher The hasher to test
@param {number} length The length of the resulting hash, in bits. Also the
    key to use in TEST_VECTOR for the expected hash value