webdevotion/combell-api

View on GitHub
lib/helpers/security.js

Summary

Maintainability
A
0 mins
Test Coverage
import { createHmac } from "crypto";

// generates a base 64 hmac with given text and secret
export function hmacify(text, secret) {
  return createHmac('sha256', secret).update(text).digest('base64');
}