import crypto from 'node:crypto';

export const hashObj = (obj: Record<string, unknown>): string => {
  const json = JSON.stringify(obj, Object.keys(obj).sort());
  return crypto.createHash('sha256').update(json).digest('hex');
};
