feat(ledger): add bookkeeping workbench and transaction views
- Add transactions_dirty table and zero-tolerance cleansing action - Implement bookkeeping workbench (/bookkeeping) with searchable Combobox channel selector and card suffix / account identifier - Implement transaction ledger (/transactions) with date groupings, multi-currency metrics, and filters - Update AGENTS.md guidelines for Base UI Select and Combobox bindings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { hash, verify } from "@node-rs/argon2";
|
||||
import { hash, verify } from "@node-rs/argon2"
|
||||
|
||||
// 遵循 OWASP 密码哈希安全推荐配置
|
||||
const ARGON2_OPTIONS = {
|
||||
@@ -6,16 +6,19 @@ const ARGON2_OPTIONS = {
|
||||
timeCost: 2,
|
||||
outputLen: 32,
|
||||
parallelism: 1,
|
||||
};
|
||||
}
|
||||
|
||||
export async function hashPassword(password: string): Promise<string> {
|
||||
return await hash(password, ARGON2_OPTIONS);
|
||||
return await hash(password, ARGON2_OPTIONS)
|
||||
}
|
||||
|
||||
export async function verifyPassword(password: string, passwordHash: string): Promise<boolean> {
|
||||
export async function verifyPassword(
|
||||
password: string,
|
||||
passwordHash: string
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
return await verify(passwordHash, password);
|
||||
return await verify(passwordHash, password)
|
||||
} catch {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user