Web Crypto API supports SHA-1, SHA-256, SHA-384, and SHA-512, but lacks MD5, SHA-224, and SHA-3. It operates asynchronously, requires a secure context (HTTPS or localhost), and does not support streaming, which necessitates custom implementations for certain tasks.
Developers implementing custom hash functions in JavaScript must handle byte ordering, signed 32-bit integer behavior, and use BigInt for 64-bit arithmetic. Testing against known vectors is essential to ensure accuracy, while a run token mechanism is required to prevent race conditions during live input processing.
For password generation, crypto.getRandomValues is the only reliable source of randomness. To avoid modulo bias, developers should use rejection sampling. Entropy calculations must be based on the actual number of unique words in a list; using smaller or duplicate-heavy lists significantly reduces security.
Current security standards, such as NIST SP 800-63B, prioritize password length and unpredictability over complex character requirements. Developers are encouraged to avoid restrictive form rules that hinder the use of long passwords or password managers.





