MCPcopy Create free account
hub / github.com/SecurityInnovation/PGPy / from_blob

Method from_blob

pgpy/types.py:192–203  ·  view source on GitHub ↗
(cls, blob)

Source from the content-addressed store, hash-verified

190
191 @classmethod
192 def from_blob(cls, blob):
193 obj = cls()
194 if (not isinstance(blob, bytes)) and (not isinstance(blob, bytearray)):
195 po = obj.parse(bytearray(blob, 'latin-1'))
196
197 else:
198 po = obj.parse(bytearray(blob))
199
200 if po is not None:
201 return (obj, po)
202
203 return obj # pragma: no cover
204
205 def __init__(self):
206 super(Armorable, self).__init__()

Callers 12

loadMethod · 0.80
test_sig_timezoneFunction · 0.80
test_ops_orderFunction · 0.80
test_load_from_strMethod · 0.80
test_load_from_bytesMethod · 0.80

Calls 1

parseMethod · 0.45