Hash Algorithm for Text Comparison