<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encode_w_salt(self, salt, key):
 """Encodes a user key with salt into a particular format. The result of this method will be used internally. :param salt: Salt for hashing :param key: User's secret key :returns: A string representing user credentials """

        enc_key = '%s%s' % (salt, key)
        enc_val = hashlib.sha1(enc_key).hexdigest()
        return "sha1:%s$%s" % (salt, enc_val)