Question: Consider the encryption code Encryption Code true false -Running incLetters(s,4) then incLetters (s,-4) will have no effect true false- stringContains is an encryption algorithm that

 Consider the encryption code Encryption Code true false -Running incLetters(s,4) thenincLetters (s,-4) will have no effect true false- stringContains is an encryption

Consider the encryption code Encryption Code true false -Running incLetters(s,4) then incLetters (s,-4) will have no effect true false- stringContains is an encryption algorithm that can be decrpyted true false - Running incLetters(s,3) then incLetters(s,3) again will have no effect true false- using maxDigit as an encryption algorighm, it can be decrypted package encryption; import java.util.Scanner; public class Encryption \ public static void main(String[] args) t Scanner scannernew Scanner (System.in); String password, encryptedPassword, salt; int increment; System.out.print( "Enter string to encrypt: "); password - scanner.next (); System.out.print( "Enter encruption salt : "); salt increment = EncryptAlgos.maxDigit(salt): if (EncryptAlgos.stringContains (salt, "d")) 1 increment-increment * (-1) ) encryptedPassword - EncryptAlgos.incLetters (password, increment); encryptedPassword - EncryptAlgos.reverseLetters (encryptedPassword); System.out.println("Encrypted string: " + encryptedPassword); - scanner. next(); class EncryptAlgos { library of encryption algorityms public static String incLetters (String s, int amount) I String es = ""; for ( int i-o ; i-0 ; --) { es es + s .charAt ( ) ; } public static int maxDigit(String s) int max - 1; for ( int 1-0 ; int num; 1 0 && num max) { max = num ;} return max; public static boolean stringContains(String s, String c)

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!