@classmethod
def from_text(cls, rdclass, rdtype, tok, origin=None, relativize=True):
    token = tok.get()
    if ((not token.is_identifier()) or (token.value != '\\#')):
        raise dns.exception.SyntaxError('generic rdata does not start with \\#')
    length = tok.get_int()
    chunks = []
    while 1:
        token = tok.get()
        if token.is_eol_or_eof():
            break
        chunks.append(token.value.encode())
    hex = b''.join(chunks)
    data = binascii.unhexlify(hex)
    if (len(data) != length):
        raise dns.exception.SyntaxError('generic rdata hex data has wrong length')
    return cls(rdclass, rdtype, data)
@classmethod
def from_text(cls, rdclass, rdtype, tok, origin=None, relativize=True):
    token = tok.get()
    if ((not token.is_identifier()) or (token.value != '\\#')):
        raise dns.exception.SyntaxError('generic rdata does not start with \\#')
    length = tok.get_int()
    chunks = []
    while 1:
        token = tok.get()
        if token.is_eol_or_eof():
            break
        chunks.append(token.value.encode())
    hex = b.join(chunks)
    data = binascii.unhexlify(hex)
    if (len(data) != length):
        raise dns.exception.SyntaxError('generic rdata hex data has wrong length')
    return cls(rdclass, rdtype, data)