@Test public void inspectPasswordDatabase() throws IOException { InputStream inputStream = getClass().getClassLoader().getResourceAsStream("test123.kdbx"); DomDatabaseWrapper database = new DomDatabaseWrapper( new KdbxStreamFormat(), new KdbxCredentials.Password("123".getBytes()), inputStream); database.save(new StreamFormat.None(), new Credentials.None(), System.out); }
@Test public void inspectKeyfileDatabase() throws IOException { InputStream keyFileInputStream = getClass().getClassLoader().getResourceAsStream("KeyFileDatabase.key"); Credentials credentials = new KdbxCredentials.KeyFile("123".getBytes(), keyFileInputStream); InputStream inputStream = getClass().getClassLoader().getResourceAsStream("KeyFileDatabase.kdbx"); DomDatabaseWrapper database = new DomDatabaseWrapper(new KdbxStreamFormat(), credentials, inputStream); database.save(new StreamFormat.None(), new Credentials.None(), System.out); }