'server only'

import { hash, compare } from "bcrypt";


export async function validatePassword(password:string, hashString:string){
    const result = await compare(password, hashString);
    return result;
}

export async function hashPassword(password:string){
    const hashString = await hash(password, 10);
    return hashString;
}

export default { validatePassword, hashPassword };