app-starlock/star_lock/lib/blue/io_protocol/io_getPublicKey.dart
2023-08-08 09:42:35 +08:00

41 lines
967 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'dart:convert';
import '../io_tool/io_tool.dart';
import 'io_reply.dart';
import 'io_sender.dart';
import 'io_type.dart';
class GetPublicKeyCommand extends SenderProtocol {
String? lockID;
GetPublicKeyCommand({
this.lockID,
}) : super(CommandType.getLockPublicKey);
@override
List<int> messageDetail() {
List<int> data = [];
print("lockID${lockID!} lockID.utf8.encode${utf8.encode(lockID!)}");
data.addAll(utf8.encode(lockID!));
for(int i = 0; i<24; i++){
data.add(0);
}
print("dataaaaaa:$data");
return data;
}
}
class GetPublicKeyReply extends Reply {
GetPublicKeyReply.parseData(CommandType commandType, List<int> dataDetail)
: super.parseData(commandType, dataDetail) {
print('获取公钥');
int index = 0;
// while(index < endIndex){
// commandKey = byteUInt8(dataDetail, index);
// index += offset_1;
// switch(commandKey){
//
// }
// }
}
}