MCPcopy Create free account
hub / github.com/mozilla/cipherscan / extData

Method extData

cscan/extensions.py:132–148  ·  view source on GitHub ↗

Serialise the extension.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected