# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Secrets Types===================.. module:: pcapkit.const.pcapng.secrets_typeThis module contains the constant enumeration for **Secrets Types**,which is automatically generated from :class:`pcapkit.vendor.pcapng.secrets_type.SecretsType`."""fromaenumimportIntEnum,extend_enum__all__=['SecretsType']
[docs]classSecretsType(IntEnum):"""[SecretsType] Secrets Types"""TLS_Key_Log=0x544c534bWireGuard_Key_Log=0x57474b4cZigBee_NWK_Key=0x5a4e574bZigBee_APS_Key=0x5a415053@staticmethoddefget(key:'int | str',default:'int'=-1)->'SecretsType':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnSecretsType(key)ifkeynotinSecretsType._member_map_:# pylint: disable=no-memberreturnextend_enum(SecretsType,key,default)returnSecretsType[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'SecretsType':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0x00000000<=value<=0xFFFFFFFF):raiseValueError('%r is not a valid %s'%(value,cls.__name__))extend_enum(cls,'Unassigned_0x%08x'%value,value)returncls(value)