We want to create a Digest Header based on SHA256 calculation.
Normally we use the crypto function in Node, but the javascript available for plugin (via Otto) is very limited.
This is what we would like to run:
const { createHash } = require(‘crypto’) ;
var digest = ‘SHA-256=’ + createHash(‘sha256’).update(body).digest().toString(‘base64’);
Anybody have suggestions how we can produce the digest header as part of a plugin, so we can include it in the API request?