@clsdcltask/dclauth
Version:
Authentication handling utils
8 lines (7 loc) • 505 B
TypeScript
/// <reference types="node" />
export declare function toHash(password: string): Promise<string>;
export declare function toHashWithSalt(password: string, salt: string): Promise<string>;
export declare function encrypt(input: string, secret: string, iv: string): Buffer;
export declare function decrypt(input: string, secret: string, iv: string): string;
export declare function compare(savedPassword: string, inputPassword: string): Promise<boolean>;
export declare function getToken(): Promise<string>;