UNPKG

@esm-pack/bcrypt

Version:

bcrypt esm package build from bcrypt-ts

17 lines (16 loc) 551 B
/** * Gets the number of rounds used to encrypt the specified hash. * * @param hash Hash to extract the used number of rounds from * @returns Number of rounds used * @throws {Error} If `hash` is not a string */ export declare const getRounds: (hash: string) => number; /** * Gets the salt portion from a hash. Does not validate the hash. * * @param hash Hash to extract the salt from * @returns Extracted salt part * @throws {Error} If `hash` is not a string or otherwise invalid */ export declare const getSalt: (hash: string) => string;