import hashlib
import base64


def checksum(string):
    """ Base 64 checksum of MD5. Used by bisurl"""
    m = hashlib.md5()
    m.update(string.encode("utf-8"))
    return base64.b85encode(m.digest()).decode("utf-8")