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

Function encode_string

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

Return an encrypted string.

(string, major, minor)

Source from the content-addressed store, hash-verified

59################################################################################
60
61def encode_string(string, major, minor):
62 'Return an encrypted string.'
63 assert isinstance(string, str)
64 _check_major(major)
65 _check_minor(minor)
66 map_1 = _encode_map_1(major)
67 map_2 = _encode_map_2(minor)
68 return _encode(string, map_1, map_2)
69
70def decode_string(string, major, minor):
71 'Return a decrypted string.'

Callers

nothing calls this directly

Calls 5

_encode_map_1Function · 0.85
_encode_map_2Function · 0.85
_check_majorFunction · 0.70
_check_minorFunction · 0.70
_encodeFunction · 0.70

Tested by

no test coverage detected