budibase/packages/core/test/nodeCrypto.js

14 lines
225 B
JavaScript

import bcrypt from "bcryptjs";
function hash(password) {
return bcrypt.hashSync(password, 10);
}
function verify(password, hash) {
return bcrypt.compareSync(password, hash);
}
export default {
hash, verify
};