How can we set the flow/global variable value to secret key in "Encrypt Node".

How can we set the flow/global variable value to secret key in "Encrypt Node".

unless the node allows it you probably can't. But you can maybe use an environment variable - Using environment variables : Node-RED
As long as you remember that environment variables are, in no way "secure". They are simply less visible. 