code: def gen_salt(length):
      
      if length <= 0:
          raise ValueError('requested salt of length <= 0')
      return ''.join(_sys_rng.choice(SALT_CHARS) for _ in range_type(length))
docs: Generate a random string of SALT_CHARS with specified ``length``.