Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
322 B

const bcrypt = require("bcryptjs");
const SALT_ROUNDS = process.env.SALT_ROUNDS || 10;
exports.hash = async data => {
const salt = await bcrypt.genSalt(SALT_ROUNDS);
const result = await bcrypt.hash(data, salt);
return result;
};
exports.compare = async (data, encrypted) => await bcrypt.compare(data, encrypted);