Seems like there's a convenience function for SHA1 but hmac=require("hmac"); ... = new hmac.HMAC(key, require('crypto').SHA256, 64, 20); might do it (if you know what block size HmacSHA256 uses?)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Would https://www.espruino.com/Reference#l_crypto_SHA256 work?
That doesn't have the HMAC but you might be able to use https://www.espruino.com/hmac
Seems like there's a convenience function for SHA1 but
hmac=require("hmac"); ... = new hmac.HMAC(key, require('crypto').SHA256, 64, 20);
might do it (if you know what block size HmacSHA256 uses?)