MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / decode

Method decode

scratchattach/utils/encoder.py:114–133  ·  view source on GitHub ↗

Args: inp (str): The encoded input. Returns: str: The decoded output.

(inp)

Source from the content-addressed store, hash-verified

112 """
113 @staticmethod
114 def decode(inp):
115 """
116 Args:
117 inp (str): The encoded input.
118
119 Returns:
120 str: The decoded output.
121 """
122 try:
123 inp = str(inp)
124 except Exception:
125 raise exceptions.InvalidDecodeInput
126
127 outp = ""
128 # print(f"Encoding.decode({inp=})")
129 # This loops through a string like 'abCDefGHijKLmnOP' like so: l1+l2=ab, CD, ef, GH, etc.
130 for l1, l2 in zip(inp[::2], inp[1::2]):
131 outp += letters[int(l1 + l2)]
132
133 return outp
134
135 @staticmethod
136 def encode(inp):

Callers 8

async_requestMethod · 0.80
parseFunction · 0.80
on_setMethod · 0.80
create_remixMethod · 0.80
login_by_idFunction · 0.80
login_by_session_stringFunction · 0.80
cmdFunction · 0.80
_decrypt_valFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected