UNPKG

@esm-pack/bcrypt

Version:

bcrypt esm package build from bcrypt-ts

18 lines (17 loc) 757 B
/** * Synchronously generates a hash for the given string. * * @param contentString String to hash * @param salt Salt length to generate or salt to use, default to 10 * @returns Resulting hash */ export declare const hashSync: (contentString: string, salt?: string | number) => string; /** * Asynchronously generates a hash for the given string. * * @param contentString String to hash * @param salt Salt length to generate or salt to use * @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 hash: (contentString: string, salt: number | string, progressCallback?: (progress: number) => void) => Promise<string>;