_clean_type_regex = _re.compile('\W+')
+ def __init__(self, key=None):
+ super(PGPPacket, self).__init__()
+ self.key = key
+
def _clean_type(self, type=None):
if type is None:
type = self['type']
subpacket['features'].add('modification detection')
def _parse_embedded_signature_signature_subpacket(self, data, subpacket):
- subpacket['embedded'] = PGPPacket()
+ subpacket['embedded'] = PGPPacket(key=self.key)
subpacket['embedded']._parse_signature_packet(data=data)
def _parse_user_id_packet(self, data):
def _packets_from_bytes(self, data):
offset = 0
while offset < len(data):
- packet = PGPPacket()
+ packet = PGPPacket(key=self)
offset += packet.from_bytes(data=data[offset:])
yield packet