MCPcopy Create free account
hub / github.com/ActiveState/code / _encode

Function _encode

recipes/Python/572159_SPICE/recipe-572159.py:338–345  ·  view source on GitHub ↗

Private module function.

(string, map_1, map_2)

Source from the content-addressed store, hash-verified

336 return map_2
337
338def _encode(string, map_1, map_2):
339 'Private module function.'
340 cache = ''
341 for character in string:
342 byte = map_1[ord(character)]
343 for shift in xrange(6, -2, -2):
344 cache += map_2[(byte >> shift) & 3][_crypt.randrange(64)]
345 return cache
346
347def _decode(string, map_1, map_2):
348 'Private module function.'

Callers 7

encode_stringFunction · 0.70
encode_fileFunction · 0.70
writeMethod · 0.70
sendMethod · 0.70
sendallMethod · 0.70
sendtoMethod · 0.70
encodeMethod · 0.70

Calls 1

xrangeClass · 0.85

Tested by

no test coverage detected