def scrap_signature(consensus, fix=b'SIGNATURE'):
    """
        Consume a signature field if there is one to consume.

        :param bytes consensus: input which may start with a signature.

        :returns: a tuple (updated-consensus, signature-or-None)
    """
    if not consensus.startswith(b'-----BEGIN ' + fix + b'-----'):
        return consensus, None

    lines = consensus.split(b'\n', 22)  # fits 0-1024o (for 256o sig)
    try:
        idx_endsig = lines.index(b'-----END ' + fix + b'-----')
    except ValueError:
        return consensus, None

    remaining = b'\n'.join(lines[idx_endsig + 1:])
    content = b''.join(lines[1:idx_endsig])
    return remaining, content