code: def generateToken(bits=32):
      
      if bits == 64:
          hasher = hashlib.sha256
      elif bits == 32:
          hasher = hashlib.md5
      else:
          raise StandardError('Unknown bit level.')
      return hasher(nstr(random.getrandbits(256))).hexdigest()
docs: Generates a random token based on the given parameters.
      
      :return     <str>