SANDBOX-485 Add Hamming distance