@perfood/couch-auth
Version:
Easy and secure authentication for CouchDB/Cloudant. Based on SuperLogin, updated and rewritten in Typescript.
19 lines (18 loc) • 586 B
TypeScript
import { Config } from './types/config';
import { HashResult } from './types/typings';
/**
* Class for hashing and verifying sl-user passwords
*/
export declare class UserHashing {
private legacy;
private pwdCouch;
private iterations;
private pbkdf2Prf;
private keyLength;
private saltLength;
constructor(config: Partial<Config>);
isUpgradeNeeded(hashObj: HashResult): boolean;
hashUserPassword(password: string): Promise<HashResult>;
verifyUserPassword(hashObj: HashResult, pw: string): Promise<boolean>;
private static createPwdModule;
}