"use strict"; import crypto from 'crypto'; function hash(algorithm, encoding, data) { let hasher = crypto.createHash(algorithm); hasher.update(data); return hasher.digest(encoding); } function sha3hex(data) { return hash("SHA3-256", "hex", data); } export { hash, sha3hex }; export default hash;