"""@package docstring
 @file scraper_utils.py
 @author Alexey <developers.hce@gmail.com>
 @link http://hierarchical-cluster-engine.com/
 @copyright Copyright &copy; 2013 IOIX Ukraine
 @license http://hierarchical-cluster-engine.com/license/
 @package HCE project node API
 @since 0.1
"""


import base64
import md5


# convert plain text to base64 encoded string
def encode(text):
  return base64.b64encode(text)
# convert base64 encoded string to plain text
def decode(text):
  return base64.b64decode(text)


def unicode_decode(text):
  return str(text).decode("utf-8")


def md5_encode(text):
  return str(md5.new(unicode_decode(text)).hexdigest())

c803c5b890ae88fe1e24df9c6d5142d4a305e874
<mask token>


def decode(text):
    return base64.b64decode(text)


<mask token>

<mask token>


def decode(text):
    return base64.b64decode(text)


<mask token>


def md5_encode(text):
    return str(md5.new(unicode_decode(text)).hexdigest())

<mask token>


def encode(text):
    return base64.b64encode(text)


def decode(text):
    return base64.b64decode(text)


def unicode_decode(text):
    return str(text).decode('utf-8')


def md5_encode(text):
    return str(md5.new(unicode_decode(text)).hexdigest())

<mask token>
import base64
import md5


def encode(text):
    return base64.b64encode(text)


def decode(text):
    return base64.b64decode(text)


def unicode_decode(text):
    return str(text).decode('utf-8')


def md5_encode(text):
    return str(md5.new(unicode_decode(text)).hexdigest())

"""@package docstring
 @file scraper_utils.py
 @author Alexey <developers.hce@gmail.com>
 @link http://hierarchical-cluster-engine.com/
 @copyright Copyright &copy; 2013 IOIX Ukraine
 @license http://hierarchical-cluster-engine.com/license/
 @package HCE project node API
 @since 0.1
"""


import base64
import md5


# convert plain text to base64 encoded string
def encode(text):
  return base64.b64encode(text)
# convert base64 encoded string to plain text
def decode(text):
  return base64.b64decode(text)


def unicode_decode(text):
  return str(text).decode("utf-8")


def md5_encode(text):
  return str(md5.new(unicode_decode(text)).hexdigest())
