コード例 #1
0
 /**
  * This method is a helper method for test runs
  *
  * @param br a mock BufferedReader.
  * @param realKey the key used in the test.
  */
 public String encryptFileTest(BufferedReader br, Integer realKey) {
   EncryptionAlgorithm<Integer> sue = new ShiftUpEncryption();
   return sue.encryptFile("", realKey, false, "repeat", 3, null, br);
 }
コード例 #2
0
 /**
  * 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);
 }