# Path: lib/jhash.py
# def str_to_base64(s):
#     """
#     >>> str_to_base64("László")
#     'TMOhc3psw7M='
#     """
#     data = base64.b64encode(s.encode())
#     return data.decode()


import readline    # to overcome the 4k input limit
from lib.jhash import str_to_base64
#!/usr/bin/env python3

"""
Convert a text (string) to a base64 string (encode).
"""




def main():
    try:
        text = input("text> ")
    except (KeyboardInterrupt, EOFError):
        print()
        return
    #
    print("Text: '{}'".format(text))
    print()

# Path: lib/jhash.py
# def str_to_base64(s):
#     """
#     >>> str_to_base64("László")
#     'TMOhc3psw7M='
#     """
#     data = base64.b64encode(s.encode())
#     return data.decode()


# Path: to_base64.py
import readline    # to overcome the 4k input limit
from lib.jhash import str_to_base64

#!/usr/bin/env python3

"""
Convert a text (string) to a base64 string (encode).
"""




def main():
    try:
        text = input("text> ")
    except (KeyboardInterrupt, EOFError):
        print()
        return
    #
    print("Text: '{}'".format(text))
    print()

    print(str_to_base64(text))