UNPKG

passwords-sqnfa-web

Version:

This library implements the recommendations that apply to client-side password handling from NIST and OWASP. The purpose of this library is to provide an easy pluggable client-side password preprocessor.

12 lines (11 loc) 461 B
/** * Calculates the byte length of a string encoded as UTF8. * * This is a direct copy of the implemation from bcryptjs. * The only thing changes is the appliance of gts linting. * * @see https://github.com/dcodeIO/bcrypt.js/blob/7e2e93af99df2952253f9cf32db29aefa8f272f7/dist/bcrypt.js#L341 * @param string The string to measure. * @returns The byte length of the string encoded as UTF8. */ export declare function utf8Length(string: string): number;