goog.crypt.byteArrayToHex(blobHasher.getHash());
    var time = goog.now() - startTime;
    display(hash + ' (' + time/1000 + 's)');
  });
  goog.events.listen(blobHasher, goog.crypt.BlobHasher.EventType.ABORT,
                     function() {
    display('Aborted');
  });
  display('Computing...');
  startTime = goog.now();
  blobHasher.hash(file);
}

function abort() {
  blobHasher.abort();
}

function display(message) {
  document.getElementById('output').innerHTML = message;
}

</script>
</body>
</html