Files
weiguang-jewelry-ledger/新账系统/server/hash.js
T

5 lines
227 B
JavaScript
Raw Normal View History

'use strict';
const crypto = require('node:crypto');
const sha = s => crypto.createHash('sha256').update(s).digest('hex');
const derive = (p, s) => crypto.scryptSync(p, s, 64).toString('hex');
module.exports = { sha, derive };