const argon2 = require('argon2'); async function HashPassword(password) { try { return await argon2.hash(password); } catch(err) { throw err; } } async function TestPassword(password, hash) { try { return await argon2.verify(hash, password); } catch(err) { throw err; } } module.exports = { HashPassword, TestPassword }