import { createHash } from 'crypto'; const digest = (algorithm, data) => createHash(algorithm).update(data).digest(); export default digest;