Serialise the extension.
(self)
| 130 | |
| 131 | @property |
| 132 | def extData(self): |
| 133 | """Serialise the extension.""" |
| 134 | if self.client_shares is None: |
| 135 | return bytearray(0) |
| 136 | |
| 137 | writer = Writer() |
| 138 | for group_id, share in self.client_shares: |
| 139 | writer.add(group_id, 2) |
| 140 | if group_id in GroupName.allFF: |
| 141 | share_length_length = 2 |
| 142 | else: |
| 143 | share_length_length = 1 |
| 144 | writer.addVarSeq(share, 1, share_length_length) |
| 145 | ext_writer = Writer() |
| 146 | ext_writer.add(len(writer.bytes), 2) |
| 147 | ext_writer.bytes += writer.bytes |
| 148 | return ext_writer.bytes |
| 149 | |
| 150 | def parse(self, parser): |
| 151 | """Deserialise the extension.""" |
nothing calls this directly
no outgoing calls
no test coverage detected