From RFC 4880 [1]:
Octet 0: 0x00
Octet 1: hash algorithm
[1]: http://tools.ietf.org/search/rfc4880#section-3.7.1.1
def _parse_string_to_key_specifier(self, data):
self['string-to-key-type'] = self._string_to_key_types[data[0]]
offset = 1
- raise NotImplementedError(
- 'string-to-key type {}'.format(self['string-to-key-type']))
+ if self['string-to-key-type'] == 'simple':
+ self['string-to-key-hash-algorithm'] = self._hash_algorithms[
+ data[offset]]
+ offset += 1
+ else:
+ raise NotImplementedError(
+ 'string-to-key type {}'.format(self['string-to-key-type']))
+ return offset
def _parse_public_key_packet(self, data):
self._parse_generic_public_key_packet(data=data)