MCPcopy Create free account
hub / github.com/ccxt/ccxt / topem

Function topem

python/ccxt/static_dependencies/ecdsa/der.py:215–221  ·  view source on GitHub ↗
(der, name)

Source from the content-addressed store, hash-verified

213
214
215def topem(der, name):
216 b64 = base64.b64encode(der)
217 lines = [("-----BEGIN %s-----\n" % name).encode()]
218 lines.extend([b64[start:start+64]+b'\n'
219 for start in range(0, len(b64), 64)])
220 lines.append(("-----END %s-----\n" % name).encode())
221 return b''.join(lines)

Callers

nothing calls this directly

Calls 4

rangeFunction · 0.50
encodeMethod · 0.45
extendMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…