Esempio n. 1
0
  @Test
  public void testIsEncryptedFileFalse() throws Exception {
    File tempDirectory = TestFileUtil.createTempDirectoryInSystemTemp();
    File testFile = new File(tempDirectory + "/somefile");

    FileUtil.writeToFile(new byte[] {1, 2, 3}, testFile);
    assertFalse(CipherUtil.isEncrypted(testFile));

    TestFileUtil.deleteDirectory(tempDirectory);
  }
Esempio n. 2
0
 public static void writeToFile(byte[] bytes, File file) throws IOException {
   writeToFile(new ByteArrayInputStream(bytes), file);
 }