def encode_w_salt(self, salt, key):
enc_key = '<STR_LIT>' % (salt, key)<EOL>enc_val = hashlib.sha512(enc_key).hexdigest()<EOL>return "<STR_LIT>" % (salt, enc_val)<EOL>
Encodes a user key with salt into a particular format. The result of
        this method will be used internal.

        :param salt: Salt for hashing
        :param key: User's secret key
        :returns: A string representing user credentials