Language: TypeScript
Label: safe
CWE: CWE-327 \u2014 Use of a Broken or Risky Cryptographic Algorithm
The product uses a broken or risky cryptographic algorithm or protocol.

Code:
  constructor(cfg) {
    super();

    /**
     * Configuration options.
     * 
     * The default `hasher` and `interations` is different from CryptoJs to enhance security:
     * https://github.com/entronad/crypto-es/security/advisories/GHSA-mpj8-q39x-wq5h
     *
     * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
     * @property {Hasher} hasher The hasher to use. Default: SHA256
     * @property {number} iterations The number of iterations to perform. Default: 250000
     */
    this.cfg = Object.assign(
      new Base(),
      {
        keySize: 128 / 32,
        hasher: SHA256Algo,
        iterations: 250000,
      },
      cfg,
    );
  }