import hashlib


def get_checksum_from_picture(picture: bytes, method: str = "md5") -> str:
    """Calculate the checksum of the provided picture, using the desired method.
    Available methods can be fetched using the the algorithms_available function.
    :param picture: picture as bytes
    :param method: hashing method as string (optional, default=md5)
    :return: checksum as string
    """
    h = hashlib.new(method.lower())
    h.update(picture)
    return h.hexdigest()