This repository has been archived on 2022-08-01. You can view files and clone it, but cannot push or open issues or pull requests.
DEMOS2/static/js/find_ballot.js

10 lines
369 B
JavaScript

$( document ).ready(function() {
ballotHash = SHA256Hash(stringtobytes(JSON.stringify($('#ballot-found').text())), true);
var hashes = $('#ballot_hashes').text().split(';');
$('#ballot_result').text("Ballot not found!");
for (var i = 0; i <= 1; i++) {
if (hashes[i] == ballotHash) {
$('#ballot_result').text("Ballot found!");
}
}
});