Implementation of enfpoint Hamming distance