chore: tweak

This commit is contained in:
pengzhanbo 2025-12-12 20:52:48 +08:00
parent 15e62010c2
commit a91cdb60d7

View File

@ -4,7 +4,7 @@ import { bcrypt } from 'hash-wasm'
export async function genEncrypt(password: string): Promise<string> { export async function genEncrypt(password: string): Promise<string> {
const salt = new Uint8Array(16) const salt = new Uint8Array(16)
crypto.getRandomValues(salt) crypto.getRandomValues(salt)
return bcrypt({ return await bcrypt({
password, password,
salt, salt,
costFactor: 11, costFactor: 11,