UNPKG

@xtsai/xai-utils

Version:

The xai-utils is an openai nodejs sdk compatible extension library.

25 lines (24 loc) 661 B
export declare class BcryptHelper { static encryptPassword(password?: string, rounds?: number): Promise<string>; /** * sortable json * @example * ```text * uid: x * json {b:2,a:1} * `${uid}${JSON.stringify(sortable:json)}` * stringify : x{\"a\":1,\"b\":2,\"uid\":\"x\"} * ``` * @param uid * @param json * @returns hash string */ static keccak256(uid: number, json?: Record<string, any>): Promise<string>; /** * * @param password * @param enpassword * @returns boolean */ static validPassword(password: string, enpassword?: string): Promise<boolean>; }