Check that there are no extra spaces in the Input fields where you specify the function names.
You’re better off writing a plugin for this. You already have the script. It’s safer to store your encryption keys as a plugin key instead of an input field.