MCPcopy Index your code
hub / github.com/CodeXBotz/File-Sharing-Bot / encode

Function encode

helper_func.py:28–32  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

26 return True
27
28async def encode(string):
29 string_bytes = string.encode("ascii")
30 base64_bytes = base64.urlsafe_b64encode(string_bytes)
31 base64_string = (base64_bytes.decode("ascii")).strip("=")
32 return base64_string
33
34async def decode(base64_string):
35 base64_string = base64_string.strip("=") # links generated before this commit will be having = sign, hence striping them to handle padding errors.

Callers 4

batchFunction · 0.90
link_generatorFunction · 0.90
channel_postFunction · 0.90
new_postFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected