# : out example # : dep cryptography import sys from typing import List from cryptography.fernet import Fernet def cryptic_hello(name: str) -> str: "Example taken from `cryptography` docs." key = Fernet.generate_key() f = Fernet(key) token = f.encrypt(hello(name).encode("utf-8")) ret = f.decrypt(token).decode("utf-8") assert ret == hello(name) return ret def hello(name: str) -> str: return f"Hello {name}" def main() -> None: if "test" in sys.argv: print("testing success") print(cryptic_hello("world")) if __name__ == "__main__": main()