Python Hash Calculator