mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 07:36:42 +08: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');
|
|
}
|