Create same token hash in python2 and python3