Question: create a JavaScript function that accepts three parameters, and returns the Caesar Cipher encrypted text: Function name: CaesarEncrypt(clearText, shiftNum, shiftLeft) Parameters: clearText : the unencrypted

create a JavaScript function that accepts three parameters, and returns the Caesar Cipher encrypted text:

Function name: CaesarEncrypt(clearText, shiftNum, shiftLeft)

Parameters:

  • clearText: the unencrypted string
  • shiftNum: the integer number of positions to shift
  • shiftLeft: the Boolean value of whether the shifting is left (true), or right (false)

Return: Encrypted text using the parameter values.

You will ONLY encrypt (i.e., shift) uppercase or lowercase alphabetic characters. All other characters are returned unshifted.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!