コード例 #1
0
  @Test
  public void shiftUpDecTest() throws IOException, InvalidEncryptionKeyException {
    // Decryption - ShiftUpEncryption
    doubleEncryption.decryptFile(TEST_INPUT2, TEST_OUT_PATH_2, TEST_KEY);
    String expected = fs.readFile(TEST_OUT_PATH_2);
    String actual = TI1;

    assertEquals(expected, actual);
  }
コード例 #2
0
  @Test
  public void shiftMulDecTest() throws IOException, InvalidEncryptionKeyException {
    // Decryption - ShiftMultiplyEncryption
    doubleEncryption.setAlgorithem(alg2);

    doubleEncryption.decryptFile(TEST_INPUT4, TEST_OUT_PATH_2, TEST_KEY2);
    String expected = fs.readFile(TEST_OUT_PATH_2);
    String actual = TI3;

    assertEquals(expected, actual);
  }