UNPKG

162 BJavaScriptView Raw
1"use strict";
2
3const crypto = require('crypto');
4
5module.exports = function(algo, key, str) {
6 return crypto.createHmac(algo, key).update(str).digest('hex');
7};