UNPKG

onoffice

Version:

OnOffice typescript api client and sdk

6 lines (5 loc) 223 B
import crypto from 'crypto-js'; export function hmac(value, secret) { //this is the only way I've found to emulate php hash_hmac in binary mode return crypto.HmacSHA256(value, secret).toString(crypto.enc.Base64); }