import CryptoJS from 'crypto-js'

export function hmacSha1Base64(text: string, secret: string) {
  const hash = CryptoJS.HmacSHA1(text, secret)
  return CryptoJS.enc.Base64.stringify(hash)
}
export function hmacSha1Hex(text: string, secret: string) {
  return CryptoJS.HmacSHA1(text, secret).toString(CryptoJS.enc.Hex)
}