UNPKG

digital-signature-office

Version:

A Library for nodejs to help to add digital signature to your office file!

9 lines 244 B
function getHashDigest(data, encoding = 'utf8', algo = 'sha256') { const shasum = crypto.createHash(algo); shasum.update(data, encoding); const res = shasum.digest("base64"); return res; } module.exports = { getHashDigest };