mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
7 lines
186 B
TypeScript
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');
|
|
}
|