| | |
| | | |
| | | import com.hdl.sdk.common.utils.SPUtils; |
| | | |
| | | import static com.hdl.sdk.common.config.TopicConstant.DEIVCE_AUTH_REQUEST; |
| | | import static com.hdl.sdk.common.config.TopicConstant.GATEWAY_SEARCH; |
| | | |
| | | /** |
| | | * Created by jlchen on 11/11/21. |
| | |
| | | */ |
| | | public boolean ifNeedEncrypt(String topicStr){ |
| | | //过滤相关需要加密的主题 |
| | | return (!topicStr.contains(DEIVCE_AUTH_REQUEST) //入网认证 |
| | | && !topicStr.contains(GATEWAY_SEARCH) //搜索网关主题 |
| | | return (!topicStr.contains(TopicConstant.GATEWAY_AUTH_BROADCAST) //网关广播入网指令 |
| | | && !topicStr.contains(TopicConstant.DEIVCE_AUTH_REQUEST) //入网认证 |
| | | && !topicStr.contains(TopicConstant.GATEWAY_SEARCH) //搜索网关主题 |
| | | && isLocalEncrypt//启用加密标志 |
| | | ); |
| | | } |