xiaoju-survey/server/src/utils/hash256.ts
2024-03-14 22:24:29 +08:00

6 lines
130 B
TypeScript

import { createHash } from 'crypto';
export function hash256(text) {
return createHash('sha256').update(text).digest('hex');
}