Hashes the specified value combined with the specified salt.
        The hash is done HASHING_ROUNDS times as specified by the application
        configuration.

        An example usage of :class:``hash_value`` would be::

            val_hash = hashing.hash_value('mysecretdata', salt='abcd')
            # save to a db or check against known hash

        :param value: The value we want hashed
        :param salt: The salt to use when generating the hash of ``value``. Default is ''.
        :return: The resulting hash as a string
        :rtype: str

def hash_value(self, value, salt=''):
        '''Hashes the specified value combined with the specified salt.
        The hash is done HASHING_ROUNDS times as specified by the application
        configuration.

        An example usage of :class:``hash_value`` would be::

            val_hash = hashing.hash_value('mysecretdata', salt='abcd')
            # save to a db or check against known hash

        :param value: The value we want hashed
        :param salt: The salt to use when generating the hash of ``value``. Default is ''.
        :return: The resulting hash as a string
        :rtype: str
        '''
        def hashit(value, salt):
            h = hashlib.new(self.algorithm)
            tgt = salt+value
            h.update(tgt)
            return h.hexdigest()

        def fix_unicode(value):
            if VER < 3 and isinstance(value, unicode):
                value = str(value)
            elif VER >= 3 and isinstance(value, str):
                value = str.encode(value)
            return value

        salt = fix_unicode(salt)
        for i in range(self.rounds):
            value = fix_unicode(value)
            value = hashit(value, salt)
        return value