'A utility function to create the 2-tuple (md5hexdigest, base64md5)
from just having a precalculated md5_hexdigest.'

def get_md5_from_hexdigest(self, md5_hexdigest):

    digest = binascii.unhexlify(md5_hexdigest)
    base64md5 = encodebytes(digest)
    if (base64md5[(-1)] == '\n'):
        base64md5 = base64md5[0:(-1)]
    return (md5_hexdigest, base64md5)
