Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 cipherStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started