Using the method and parameters specified in algorithm and the keying material provided by baseKey, this method attempts to generate length bits. The Node.js implementation requires that when length is a number it must be multiple of 8. When length is null the maximum number of bits for a given algorithm is generated. This is allowed for the 'ECDH', 'X25519', and 'X448' algorithms. If successful, the returned promise will be resolved with an <ArrayBuffer> containing the generated data.
The algorithms currently supported include:
'Argon2d''Argon2i''Argon2id''ECDH''HKDF''PBKDF2''X25519''X448'