41 lines
938 B
Dart
41 lines
938 B
Dart
|
||
import 'dart:convert';
|
||
|
||
import 'io_reply.dart';
|
||
import 'io_sender.dart';
|
||
import 'io_type.dart';
|
||
|
||
class GetPrivateKeyCommand extends SenderProtocol {
|
||
|
||
String? lockID;
|
||
GetPrivateKeyCommand({
|
||
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 GetPrivateKeyReply extends Reply {
|
||
GetPrivateKeyReply.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){
|
||
//
|
||
// }
|
||
// }
|
||
}
|
||
} |