MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / _decode

Method _decode

src/api.py:145–152  ·  view source on GitHub ↗
(self, text, decode_type)

Source from the content-addressed store, hash-verified

143 return False
144
145 def _decode(self, text, decode_type):
146 try:
147 if decode_type == 'hex':
148 return unhexlify(text)
149 elif decode_type == 'base64':
150 return base64.b64decode(text)
151 except Exception as e:
152 raise APIError(22, "Decode error - " + str(e) + ". Had trouble while decoding string: " + repr(text))
153
154 def _verifyAddress(self, address):
155 status, addressVersionNumber, streamNumber, ripe = decodeAddress(address)

Calls 1

APIErrorClass · 0.85

Tested by

no test coverage detected