I want to convert a string to use it as a custom key for Fernet.
Current code
masterKey = base64.b64encode("F4D27D47".encode("utf-8"))
crypter = Fernet(masterKey)
However this raises and exception:
ValueError: Fernet key must be 32 url-safe base64-encoded bytes.
Thanks in advance.