心跳指令不加密:若是心跳指令加密,非法设备不能正确退网
This commit is contained in:
parent
1b89816997
commit
aa16992982
|
@ -527,7 +527,7 @@ bool TinyController::Send(Message& msg)
|
||||||
static bool Encrypt(Message& msg, Array& pass)
|
static bool Encrypt(Message& msg, Array& pass)
|
||||||
{
|
{
|
||||||
// 加解密。组网不加密,退网不加密
|
// 加解密。组网不加密,退网不加密
|
||||||
if(msg.Length > 0 && pass.Length() > 0 && !(msg.Code == 0x01 || msg.Code == 0x02))
|
if(msg.Length > 0 && pass.Length() > 0 && !(msg.Code == 0x01 || msg.Code == 0x02||msg.Code==0x03))
|
||||||
{
|
{
|
||||||
Array bs(msg.Data, msg.Length);
|
Array bs(msg.Data, msg.Length);
|
||||||
RC4::Encrypt(bs, pass);
|
RC4::Encrypt(bs, pass);
|
||||||
|
|
Loading…
Reference in New Issue