Examples of validateRevisionsPassword()


Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.validateRevisionsPassword()

        password = "T\u0400ST\u0100passwordWhichIsLongerThan15Chars";
        workbook.setRevisionsPassword(password, null);
        hashVal = CryptoFunctions.createXorVerifier1(password);
        actualVal = Integer.parseInt(workbook.getCTWorkbook().getWorkbookProtection().xgetRevisionsPassword().getStringValue(),16);
        assertEquals(hashVal, actualVal);
        assertTrue(workbook.validateRevisionsPassword(password));
    }
   
    @Test
    public void shouldReadWorkbookProtection() throws Exception {
    XSSFWorkbook workbook = openSampleWorkbook("workbookProtection_not_protected.xlsx");
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.validateRevisionsPassword()

        wb.setRevisionsPassword("test", HashAlgorithm.sha1);
       
        wb = writeOutAndReadBack(wb);
       
        assertTrue(wb.isRevisionLocked());
        assertTrue(wb.validateRevisionsPassword("test"));
    }
   
    @SuppressWarnings("resource")
    @Test
  public void testIntegration() throws Exception {
View Full Code Here

Examples of org.apache.poi.xssf.usermodel.XSSFWorkbook.validateRevisionsPassword()

    wb.setRevisionsPassword("test", null);

    wb = writeOutAndReadBack(wb);
   
    assertTrue(wb.isRevisionLocked());
    assertTrue(wb.validateRevisionsPassword("test"));
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.