MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / main

Function main

ciphers/base16.py:3–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import base64
2
3def main():
4 inp = input('->')
5 encoded = inp.encode('utf-8') #encoded the input (we need a bytes like object)
6 b16encoded = base64.b16encode(encoded) #b16encoded the encoded string
7 print(b16encoded)
8 print(base64.b16decode(b16encoded).decode('utf-8'))#decoded it
9
10if __name__ == '__main__':
11 main()

Callers 1

base16.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected