encode method
Encode list tlv to list bytes
Implementation
@override
Uint8List encode(List<TLV> tlvList) {
final byteLists = <Uint8List>[];
for (final tlv in tlvList) {
final typeBytes = Uint8List.fromList([tlv.type]);
final lengthBytes = _encodeLength(tlv.value.length);
byteLists.addAll([typeBytes, lengthBytes, tlv.value]);
}
return _concatenateUint8List(byteLists);
}