SHA1 collision analysis and resolving a problem of recursive hashing with xrange and long numbers