Solved

A Caesar Cipher Uses a Shift of Each Character by a Key

Question 65

Multiple Choice

A Caesar cipher uses a shift of each character by a key with a value between 1 and 255.An a with a shift of 3 becomes a d.For the encrypt method below, select the correct body.Assume the key shift property is accessible to the method.
public int encrypt(int b)
{
__________
}


A) return (b + key) % 256) ;
B) return (b + key % 26) ;
C) return (b + key) ;
D) return (b + 26 % key) ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions