mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
13 lines
307 B
TypeScript
13 lines
307 B
TypeScript
import { hashString } from '../auth/hash';
|
|
import { encryptSecondaryData } from './encrypt';
|
|
|
|
export const sign = (data: unknown) => {
|
|
const stringified = JSON.stringify(data);
|
|
|
|
const hashed = hashString(stringified);
|
|
|
|
const signature = encryptSecondaryData({ data: hashed });
|
|
|
|
return signature;
|
|
};
|