Proper encoding of the ballot id so it may be compared with the JAPIs