import hashlib


def cat2hash(category):
    """
    Hash a category string in order to be usable in dict for example.

    :arg str category:
        A category string.

    :returns:
        A hash of this category string
    """
    return hashlib.md5(category.encode('utf-8')).hexdigest()