• Derives a key from a password.

    Parameters

    • password: string | cryptojs.lib.WordArray

      The password.

    • salt: string | cryptojs.lib.WordArray

      A salt.

    • Optionalcfg: {
          hasher?: HasherStatic;
          iterations: number;
          keySize: number;
      }

      (Optional) The configuration options to use for this computation.

      • Optionalhasher?: HasherStatic
      • iterations: number
      • keySize: number

    Returns WordArray

    The derived key.

    var key = CryptoJS.EvpKDF(password, salt);
    var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
    var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });