eric6/WebBrowser/SafeBrowsing/SafeBrowsingUtilities.py

Sun, 05 May 2019 16:15:34 +0200

author
Jaime Seuma <jaims.seuma@gmail.com>
date
Sun, 05 May 2019 16:15:34 +0200
changeset 7002
3b51a78773d5
parent 6942
2602857055c5
permissions
-rw-r--r--

Spanish i18n update for eric6 default branch

# -*- coding: utf-8 -*-

# Copyright (c) 2017 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing some utilities for Google Safe Browsing.
"""

from __future__ import unicode_literals

import sys

if sys.version_info < (3, 0):
    def toHex(value):
        """
        Public method to convert a bytes array to a hex string.
        
        @param value value to be converted
        @type bytes
        @return hex string
        @rtype str
        """
        return value.encode("hex")
else:
    def toHex(value):
        """
        Public method to convert a bytes array to a hex string.
        
        @param value value to be converted
        @type bytes
        @return hex string
        @rtype str
        """
        return value.hex()

eric ide

mercurial