def from_bytes(cls, ext: bytes):
        """Build a TLSExtensionSignature from a raw TLS extension.

        Parameters
        ----------
        ext : bytes
            Raw over-the-wire contents of the TLS extension.
        """
        off = 0
        header = TLSExtensionHeader._make(struct.unpack_from(
            TLS_EXTENSION_HEADER, ext, off
        ))
        off += struct.calcsize(TLS_EXTENSION_HEADER)
        if header.type in TLS_GREASE_VALUES:
            ext_type = TLSExtensionType.GREASE
        else:
            ext_type = TLSExtensionType(header.type)

        if ext_type in cls.registry:
            return cls.registry[ext_type].from_bytes(
                length=header.length,
                data=ext[off:off + header.length]
            )
        else:
            return TLSExtensionSignature(
                ext_type=ext_type,
                length=header.length
            )
Build a TLSExtensionSignature from a raw TLS extension.

        Parameters
        ----------
        ext : bytes
            Raw over-the-wire contents of the TLS extension.
        
tests/signature.py