mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 00:26:20 +08:00
9 lines
240 B
TypeScript
9 lines
240 B
TypeScript
import { createHash } from 'node:crypto';
|
|
|
|
function createContentHash(content: string, hashLSize = 12) {
|
|
const hash = createHash('sha256').update(content);
|
|
return hash.digest('hex').slice(0, hashLSize);
|
|
}
|
|
|
|
export { createContentHash };
|