import java.util.Arrays; /** * Ponitfex class for encrypting/decrypting strings. * @author cs416 * @version 2 */ public class Pontifex { private Integer[] deck; /** * Initializes the Pontifex object with the provided interger array * representing the deck of cards. * @param deck The deck of cards used for the Pontifex algorithm */ public Pontifex(Integer[] deck) { this.deck = deck; } /** * encrypts the message using the initial deck. * @param message The message to encrypt * @return String The encrypted meaage */ public String encrypt(String message) { throw new UnsupportedOperationException("TO BE IMPLEMENTED"); } /** * decrypts the message using the deck. * @param message The message to decrypt * @return String the decrypted message */ public String decrypt(String message) { throw new UnsupportedOperationException("TO BE IMPLEMENTED"); } /** * generates the keystream value from the deck configuration. * @return int The keystream value */ public int keystream() { throw new UnsupportedOperationException("TO BE IMPLEMENTED"); } /** * @return String that represents the deck of cards. */ public String toString() { return Arrays.toString(deck); } /** * main function used for testing purposes. * @param args command line arguments */ public static void main(String[] args) { Pontifex p = new Pontifex(new Integer[]{19, 18, 21, 25, 6, 17, 15, 27, 14, 22, 28, 20, 5, 12, 2, 13, 9, 16, 3, 7, 10, 23, 8, 24, 4, 11, 1O, 26}); System.out.println(p.encrypt("hello")); p = new Pontifex(new Integer[]{22, 8, 25, 23, 15, 5, 1, 12, 13, 26, 9, 18, 14, 6, 28, 19, 21, 17, 20, 3, 10, 16, 27, 24, 11, 7, 4, 2}); System.out.println(p.decrypt("UVCCU MNUFA")); } }