Edits history of script submission #22417 for ' Hash Password with Random Salt (bcrypt)'

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

    Submitted by hugo989 5 days ago