def uhash(self, val):
        """Calculate hash from unicode value and return hex value as unicode"""

        if not isinstance(val, string_types):
            raise _TypeError("val", "str", val)

        return codecs.encode(self.hash(val.encode("utf-8")), "hex_codec").decode("utf-8")
Calculate hash from unicode value and return hex value as unicode