UNPKG

@esm-pack/bcrypt

Version:

bcrypt esm package build from bcrypt-ts

17 lines (16 loc) 650 B
/** * Synchronously tests a string against a hash. * * @param content String to compare * @param hash Hash to test against */ export declare const compareSync: (content: string, hash: string) => boolean; /** * Asynchronously compares the given data against the given hash. * * @param content Data to compare * @param hash Data to be compared to * @param progressCallback Callback successively called with the percentage of rounds completed * (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms. */ export declare const compare: (content: string, hash: string, progressCallback?: (percent: number) => void) => Promise<boolean>;