Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a JavaScript function that accepts three parameters, and returns the Caesar Cipher encrypted text. Reference the Caesar Cipher Wikipedia page to learn more about

Create a JavaScript function that accepts three parameters, and returns the Caesar Cipher encrypted text. Reference the Caesar Cipher Wikipedia page to learn more about the technical specifications of the Caesar Cipher.

Function name: CaesarEncrypt(clearText, shiftNum, shiftLeft)

Parameters:

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

Return: Encrypted text using the parameter values.

Output: No output

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

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

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago