/** * The decryption method - this method takes the given file and decrypt it using the Repeat * Algorithm. * * @param filePath the full path of the file we want to decrypt. * @param keyPath the full path of the key file. */ public void decryptFile(String filePath, String keyPath) { EncryptionAlgorithm<Integer> sue = new ShiftUpEncryption(); sue.decryptFile(filePath, keyPath, null, "repeat", 3, null); }
/** * This method is a helper method for test runs * * @param br a mock BufferedReader. * @param realKey the key used in the test. */ public String decryptFileTest(BufferedReader br, Integer realKey) { EncryptionAlgorithm<Integer> sue = new ShiftUpEncryption(); return sue.decryptFile("", "", realKey, "repeat", 3, br); }
/** * The encryption method - this method takes the given file and encrypt it using the Repeat * Encryption algorithm. * * @param filePath the full path of the file we want to encrypt. */ public void encryptFile(String filePath) { EncryptionAlgorithm<Integer> sue = new ShiftUpEncryption(); sue.encryptFile(filePath, null, false, "repeat", 3, maxKey, null); }