Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+Are there shop stewards?

Answered: 1 week ago