Caesar cipher uses a shift of each character by a key with a value between 1 and 255. An a with a shift equal to 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) ;
B) return (b + key % 26) ;
C) return (b + key) % 256) ;
D) return (b + 26 % key) ;
Correct Answer:
Verified
Q21: If you want to process text data
Q22: The FileInputStream read method reads binary data.
Q26: What is the lowest value for a
Q28: Caesar cipher uses a shift of each
Q33: What is the result of the following
Q34: If you write a simple Student class,
Q37: Caesar cipher uses a shift of each
Q38: How many bytes does the read method
Q39: What is returned by the read method
Q54: Which of the following classes are used
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents