Initial implementation of dhash