@tree-house/authentication
Version:
Tree House Authentication
11 lines (10 loc) • 577 B
TypeScript
export declare function getHashedPassword(password: string, saltCount: number): Promise<string>;
export declare function generateRandomHash(algorithm?: string, secret?: string): string;
export declare function comparePassword(password: string, hashedPw: string): Promise<boolean>;
export declare function hashPassword(password: string, { algorithm, key, iv }: IHashOptions): string;
export declare function dehashPassword(password: string, { algorithm, key, iv }: IHashOptions): string;
export interface IHashOptions {
algorithm: string;
key: string;
iv: string;
}