code: def hash_data(salt, value, hash_alg=None):
      
      hash_alg = hash_alg or 'sha512'
      hasher = hashlib.new(hash_alg)
      hasher.update(value.encode('utf-8'))
      hasher.update(salt.encode('utf-8'))
      value_hashed = hasher.hexdigest()
      return value_hashed
docs: Hashes a value together with a salt with the given hash algorithm.
  
      :type salt: str
      :type hash_alg: str
      :type value: str
      :param salt: hash salt
      :param hash_alg: the hash algorithm to use (default: SHA512)
      :param value: value to hash together with the salt
      :return: hashed value