OpenSSL: {
    execute(password: string, keySize: number, ivSize: number, salt?: string | cryptojs.lib.WordArray): cryptojs.lib.CipherParams;
}

OpenSSL key derivation function.

Type declaration

  • execute:function
    • Derives a key and IV from a password.

      Parameters

      • password: string

        The password to derive from.

      • keySize: number

        The size in words of the key to generate.

      • ivSize: number

        The size in words of the IV to generate.

      • Optionalsalt: string | cryptojs.lib.WordArray

        (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.

      Returns cryptojs.lib.CipherParams

      A cipher params object with the key, IV, and salt.

      var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
      var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');