Question: Could someone please help me solve this problem in Javascript? Thanks 9. A function that accepts two arguments: a crypto key and a crypto algorithm,

Could someone please help me solve this problem in Javascript? Thanks
9. A function that accepts two arguments: a crypto key and a crypto algorithm, and returns an array of two functions that use the key and algorithm. The first returned function is an encryption function that turns a string into a hex string, and the second is a decryption function that turns the hex string into a string. Use the built-in Node crypto module. > const [encrypt, decrypt]makeCryptoFunctions( super dog', aes-256-cbc') encrypt( Hello world') 9714236cbedfd8d9799acea4ea79e6fe > decrypt'9714236cbedfd8d9799acea4ea79e6fe) Hello world const [encrypt, decrypt]makeCryptoFunctions( super dog', 'sdkjfhsdk117dasf') > encrypt('Hello world) Error: Unknown cipher
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
