UNPKG

@perfood/couch-auth

Version:

Easy and secure authentication for CouchDB/Cloudant. Based on SuperLogin, updated and rewritten in Typescript.

15 lines (14 loc) 589 B
import pwdModule from '@sl-nx/couch-pwd'; import { Config } from './types/config'; import { HashResult, LocalHashObj } from './types/typings'; export declare class Hashing { hashers: Record<string, pwdModule[]>; times: Record<string, number[]>; defaultDigest: 'sha1' | 'sha256'; dummyHashObject: LocalHashObj; constructor(config: Partial<Config>); private getHasherForTimestamp; hashUserPassword(pw: string): Promise<HashResult>; verifyUserPassword(hashObj: HashResult, pw: string): Promise<boolean>; getDigest(pbkdf2_prf: string): 'sha1' | 'sha256'; }