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.
20 lines (19 loc) • 784 B
TypeScript
import { HandlerSync } from '../types/sqnfa';
import { Result } from '../result';
export declare class Sha512Handler implements HandlerSync {
readonly name: string;
/**
* NIST 800-107: Some applications may require a value that
* is shorter than the (full-length) message digest provided
* by an approved hash function as specified in FIPS 180-4.
* In such cases, it may be appropriate to use a subset of the
* bits produced by the hash function as the (shortened) message
* digest.
*
* This handler calculates the SHA512/432 of the password and encode
* the result in base64. This makes the encoded digest 72 bytes
* making it fit perfectly into bcrypt.
*/
constructor();
handleSync(password: string): Result;
}