UNPKG

@fdm-monster/server

Version:

FDM Monster is a bulk OctoPrint manager to set up, configure and monitor 3D printers. Our aim is to provide extremely optimized websocket performance and reliability.

29 lines (28 loc) 782 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { comparePasswordHash: function() { return comparePasswordHash; }, hashPassword: function() { return hashPassword; } }); const _bcryptjs = require("bcryptjs"); function hashPassword(password) { const salt = (0, _bcryptjs.genSaltSync)(10); return (0, _bcryptjs.hashSync)(password, salt); } function comparePasswordHash(password, passwordHash) { if (!password?.length) return false; return (0, _bcryptjs.compareSync)(password, passwordHash); } //# sourceMappingURL=crypto.utils.js.map