Files
AFFiNE-Mirror/apps/electron/layers/preload/src/sha256sum.ts
2023-03-16 22:58:21 +08:00

7 lines
186 B
TypeScript

import type { BinaryLike } from 'crypto';
import { createHash } from 'crypto';
export function sha256sum(data: BinaryLike) {
return createHash('sha256').update(data).digest('hex');
}