Feature Request: HMAC256 and other crypto functions

Hi all,

currently it is impossible to communicate with webservices that use a JWT for authentication. Do generate such a Javascript Web Token you need to sign the token contents by executing HMAC256(tokenContent,secret) function. As this is not available in any javascript lib that can easily be imported to scriptable, I think this would be a nice addition to the existing native APIs.

What about introducing Crypto.HMAC256, Crypto.MD5 and so on?

Not sure how possible HMAC256 is but MD5, SHA1, SHA256, & SHA512 are available in the Generate Hash action.

I know about the Generate Hash action. But my request was to include this in the Scriptable app. Or is there any way how to call iOS shortcuts directly within scriptable?

The reason I mentioned Generate Hash was because your originally posted under Shortcuts.

You can get a copy of the CryptoJS HMAC SHA256 and save it as a module.

const CryptoJS = importModule('./CryptoJS')

var hash = CryptoJS.HmacSHA256('message','secret')

console.log(hash)