As far as I know Qlik Sense doesn't have a mechanism for plugging in code like that. If you only need the hash values in Qlik Sense (or Qlikview) you can use the builtin hash256 function. But that's not SHA-256.
PS you posted this in the Qlikview section. There's a Qlik Sense section too dedicated entirely to Qlik Sense.