def dissect(self, data):
        """
        Dissect the field.

        :param bytes data: The data to extract the field value from
        :return: The rest of the data not used to dissect the field value
        :rtype: bytes
        """

        size = struct.calcsize("B")
        if len(data) < size:
            raise NotEnoughData(
                "Not enough data to decode field '%s' value" % self.name
            )

        curve_type = struct.unpack("B", data[:size])[0]
        if curve_type == 0x03:
            self._value = ECParametersNamedCurveField("none")
            data = self._value.dissect(data)
        else:
            raise NotImplementedError(
                "Decoding of KeyExchange message for curve 0x%.2X not implemented" % curve_type
            )
        return data
def dissect ( self , data ) : size = struct . calcsize ( "B" ) if len ( data ) < size : raise NotEnoughData ( "Not enough data to decode field '%s' value" % self . name ) curve_type = struct . unpack ( "B" , data [ : size ] ) [ 0 ] if curve_type == 0x03 : self . _value = ECParametersNamedCurveField ( "none" ) data = self . _value . dissect ( data ) else : raise NotImplementedError ( "Decoding of KeyExchange message for curve 0x%.2X not implemented" % curve_type ) return data
Dissect the field.

        :param bytes data: The data to extract the field value from
        :return: The rest of the data not used to dissect the field value
        :rtype: bytes