Edits history of script submission #22418 for ' Hash Password with Manual Salt (helper)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    import bcrypt from "bcryptjs@2";
    
    export async function main(password: string, salt_num: number) {
      const salt = await bcrypt.genSalt(salt_num);
      const hash_pass = await bcrypt.hash(password, salt);
    
      return hash_pass;
    }
    

    Submitted by hugo989 4 days ago