소스 검색

Add timestamp protocol

maxep 6 년 전
부모
커밋
0a4bd42c6d

+ 687 - 0
Fixtures/password-five-entries-ladder.xml

@@ -0,0 +1,687 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<KeePassFile>
+    <Meta>
+        <Generator>MacPass</Generator>
+        <HeaderHash>oQlsDi8Tv2zpDOzpzUPnNBmJoItOhikqO0aDxB+3YyM=</HeaderHash>
+        <DatabaseName>Database</DatabaseName>
+        <DatabaseNameChanged>2018-10-16T10:17:31Z</DatabaseNameChanged>
+        <DatabaseDescription />
+        <DatabaseDescriptionChanged>2018-10-16T10:17:31Z</DatabaseDescriptionChanged>
+        <DefaultUserName />
+        <DefaultUserNameChanged>2018-10-16T10:17:31Z</DefaultUserNameChanged>
+        <MaintenanceHistoryDays>365</MaintenanceHistoryDays>
+        <Color />
+        <MasterKeyChanged>2018-10-16T10:17:46Z</MasterKeyChanged>
+        <MasterKeyChangeRec>-1</MasterKeyChangeRec>
+        <MasterKeyChangeForce>-1</MasterKeyChangeForce>
+        <MemoryProtection>
+            <ProtectTitle>False</ProtectTitle>
+            <ProtectUserName>False</ProtectUserName>
+            <ProtectPassword>True</ProtectPassword>
+            <ProtectURL>False</ProtectURL>
+            <ProtectNotes>False</ProtectNotes>
+        </MemoryProtection>
+        <RecycleBinEnabled>False</RecycleBinEnabled>
+        <RecycleBinUUID>AAAAAAAAAAAAAAAAAAAAAA==</RecycleBinUUID>
+        <RecycleBinChanged>2018-10-16T10:17:31Z</RecycleBinChanged>
+        <EntryTemplatesGroup />
+        <EntryTemplatesGroupChanged>2018-10-16T10:17:31Z</EntryTemplatesGroupChanged>
+        <HistoryMaxItems>10</HistoryMaxItems>
+        <HistoryMaxSize>6291456</HistoryMaxSize>
+        <LastSelectedGroup>BNhuTL6mSL2j6F98eXlPKw==</LastSelectedGroup>
+        <LastTopVisibleGroup>AAAAAAAAAAAAAAAAAAAAAA==</LastTopVisibleGroup>
+        <Binaries />
+        <CustomData />
+    </Meta>
+    <Root>
+        <Group>
+            <UUID>gl3mtgC2S66D6lzMfIh60Q==</UUID>
+            <Name>General</Name>
+            <Notes />
+            <IconID>48</IconID>
+            <Times>
+                <LastModificationTime>2018-10-16T10:17:31Z</LastModificationTime>
+                <CreationTime>2018-10-16T10:17:31Z</CreationTime>
+                <LastAccessTime>2018-10-16T10:17:31Z</LastAccessTime>
+                <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                <Expires>False</Expires>
+                <UsageCount>0</UsageCount>
+                <LocationChanged>2018-10-16T10:17:31Z</LocationChanged>
+            </Times>
+            <IsExpanded>True</IsExpanded>
+            <DefaultAutoTypeSequence />
+            <EnableAutoType>null</EnableAutoType>
+            <EnableSearching>null</EnableSearching>
+            <LastTopVisibleEntry>AAAAAAAAAAAAAAAAAAAAAA==</LastTopVisibleEntry>
+            <Group>
+                <UUID>pT7yNh2KRXuYq/PWQmJs+g==</UUID>
+                <Name>Windows</Name>
+                <Notes />
+                <IconID>38</IconID>
+                <Times>
+                    <LastModificationTime>2018-10-16T10:17:31Z</LastModificationTime>
+                    <CreationTime>2018-10-16T10:17:31Z</CreationTime>
+                    <LastAccessTime>2018-10-16T10:17:31Z</LastAccessTime>
+                    <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                    <Expires>False</Expires>
+                    <UsageCount>0</UsageCount>
+                    <LocationChanged>2018-10-17T09:52:49Z</LocationChanged>
+                </Times>
+                <IsExpanded>False</IsExpanded>
+                <DefaultAutoTypeSequence />
+                <EnableAutoType>null</EnableAutoType>
+                <EnableSearching>null</EnableSearching>
+                <LastTopVisibleEntry>AAAAAAAAAAAAAAAAAAAAAA==</LastTopVisibleEntry>
+            </Group>
+            <Group>
+                <UUID>UprnvsYNSmSDft7g7ZLi5A==</UUID>
+                <Name>Network</Name>
+                <Notes />
+                <IconID>3</IconID>
+                <Times>
+                    <LastModificationTime>2018-10-16T10:17:31Z</LastModificationTime>
+                    <CreationTime>2018-10-16T10:17:31Z</CreationTime>
+                    <LastAccessTime>2018-10-16T10:17:31Z</LastAccessTime>
+                    <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                    <Expires>False</Expires>
+                    <UsageCount>0</UsageCount>
+                    <LocationChanged>2018-10-17T09:52:49Z</LocationChanged>
+                </Times>
+                <IsExpanded>False</IsExpanded>
+                <DefaultAutoTypeSequence />
+                <EnableAutoType>null</EnableAutoType>
+                <EnableSearching>null</EnableSearching>
+                <LastTopVisibleEntry>AAAAAAAAAAAAAAAAAAAAAA==</LastTopVisibleEntry>
+            </Group>
+            <Group>
+                <UUID>O2yCuxckRxetGWs312O+aw==</UUID>
+                <Name>Internet</Name>
+                <Notes />
+                <IconID>1</IconID>
+                <Times>
+                    <LastModificationTime>2018-10-16T10:17:31Z</LastModificationTime>
+                    <CreationTime>2018-10-16T10:17:31Z</CreationTime>
+                    <LastAccessTime>2018-10-16T10:17:31Z</LastAccessTime>
+                    <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                    <Expires>False</Expires>
+                    <UsageCount>0</UsageCount>
+                    <LocationChanged>2018-10-17T09:52:49Z</LocationChanged>
+                </Times>
+                <IsExpanded>False</IsExpanded>
+                <DefaultAutoTypeSequence />
+                <EnableAutoType>null</EnableAutoType>
+                <EnableSearching>null</EnableSearching>
+                <LastTopVisibleEntry>AAAAAAAAAAAAAAAAAAAAAA==</LastTopVisibleEntry>
+            </Group>
+            <Group>
+                <UUID>gTzQoHdaTgOQY2NiL8944g==</UUID>
+                <Name>EMail</Name>
+                <Notes />
+                <IconID>19</IconID>
+                <Times>
+                    <LastModificationTime>2018-10-16T10:17:31Z</LastModificationTime>
+                    <CreationTime>2018-10-16T10:17:31Z</CreationTime>
+                    <LastAccessTime>2018-10-16T10:17:31Z</LastAccessTime>
+                    <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                    <Expires>False</Expires>
+                    <UsageCount>0</UsageCount>
+                    <LocationChanged>2018-10-17T09:52:49Z</LocationChanged>
+                </Times>
+                <IsExpanded>False</IsExpanded>
+                <DefaultAutoTypeSequence />
+                <EnableAutoType>null</EnableAutoType>
+                <EnableSearching>null</EnableSearching>
+                <LastTopVisibleEntry>AAAAAAAAAAAAAAAAAAAAAA==</LastTopVisibleEntry>
+            </Group>
+            <Group>
+                <UUID>tia6bQr3SZajKJBRqwI7/g==</UUID>
+                <Name>Homebanking</Name>
+                <Notes />
+                <IconID>37</IconID>
+                <Times>
+                    <LastModificationTime>2018-10-16T10:17:31Z</LastModificationTime>
+                    <CreationTime>2018-10-16T10:17:31Z</CreationTime>
+                    <LastAccessTime>2018-10-16T10:17:31Z</LastAccessTime>
+                    <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                    <Expires>False</Expires>
+                    <UsageCount>0</UsageCount>
+                    <LocationChanged>2018-10-17T09:52:49Z</LocationChanged>
+                </Times>
+                <IsExpanded>False</IsExpanded>
+                <DefaultAutoTypeSequence />
+                <EnableAutoType>null</EnableAutoType>
+                <EnableSearching>null</EnableSearching>
+                <LastTopVisibleEntry>AAAAAAAAAAAAAAAAAAAAAA==</LastTopVisibleEntry>
+            </Group>
+            <Group>
+                <UUID>BNhuTL6mSL2j6F98eXlPKw==</UUID>
+                <Name>New Group</Name>
+                <Notes />
+                <IconID>48</IconID>
+                <Times>
+                    <LastModificationTime>2018-10-16T10:17:37Z</LastModificationTime>
+                    <CreationTime>2018-10-16T10:17:37Z</CreationTime>
+                    <LastAccessTime>2018-10-16T10:17:37Z</LastAccessTime>
+                    <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                    <Expires>False</Expires>
+                    <UsageCount>0</UsageCount>
+                    <LocationChanged>2018-10-17T09:52:49Z</LocationChanged>
+                </Times>
+                <IsExpanded>False</IsExpanded>
+                <DefaultAutoTypeSequence />
+                <EnableAutoType>null</EnableAutoType>
+                <EnableSearching>null</EnableSearching>
+                <LastTopVisibleEntry>AAAAAAAAAAAAAAAAAAAAAA==</LastTopVisibleEntry>
+                <Entry>
+                    <UUID>IDsxLCDlT+iNk398rApJNA==</UUID>
+                    <IconID>0</IconID>
+                    <ForegroundColor />
+                    <BackgroundColor />
+                    <OverrideURL />
+                    <Tags />
+                    <Times>
+                        <LastModificationTime>2018-10-17T12:10:15Z</LastModificationTime>
+                        <CreationTime>2018-10-16T10:18:01Z</CreationTime>
+                        <LastAccessTime>2018-10-16T10:18:01Z</LastAccessTime>
+                        <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                        <Expires>False</Expires>
+                        <UsageCount>0</UsageCount>
+                        <LocationChanged>2018-10-17T09:52:49Z</LocationChanged>
+                    </Times>
+                    <String>
+                        <Key>Title</Key>
+                        <Value>Entry 1</Value>
+                    </String>
+                    <String>
+                        <Key>UserName</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Password</Key>
+                        <Value Protected="True">AOwr9oAa</Value>
+                    </String>
+                    <String>
+                        <Key>URL</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Notes</Key>
+                        <Value />
+                    </String>
+                    <AutoType>
+                        <Enabled>True</Enabled>
+                        <DataTransferObfuscation>0</DataTransferObfuscation>
+                    </AutoType>
+                    <History>
+                        <Entry>
+                            <UUID>IDsxLCDlT+iNk398rApJNA==</UUID>
+                            <IconID>0</IconID>
+                            <ForegroundColor />
+                            <BackgroundColor />
+                            <OverrideURL />
+                            <Tags />
+                            <Times>
+                                <LastModificationTime>2018-10-16T10:18:01Z</LastModificationTime>
+                                <CreationTime>2018-10-16T10:18:01Z</CreationTime>
+                                <LastAccessTime>2018-10-16T10:18:01Z</LastAccessTime>
+                                <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                                <Expires>False</Expires>
+                                <UsageCount>0</UsageCount>
+                                <LocationChanged>2018-10-16T10:18:01Z</LocationChanged>
+                            </Times>
+                            <String>
+                                <Key>Title</Key>
+                                <Value>New Entry</Value>
+                            </String>
+                            <String>
+                                <Key>UserName</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Password</Key>
+                                <Value Protected="True">tYumIe8XorQLkvrE</Value>
+                            </String>
+                            <String>
+                                <Key>URL</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Notes</Key>
+                                <Value />
+                            </String>
+                            <AutoType>
+                                <Enabled>True</Enabled>
+                                <DataTransferObfuscation>0</DataTransferObfuscation>
+                            </AutoType>
+                        </Entry>
+                        <Entry>
+                            <UUID>IDsxLCDlT+iNk398rApJNA==</UUID>
+                            <IconID>0</IconID>
+                            <ForegroundColor />
+                            <BackgroundColor />
+                            <OverrideURL />
+                            <Tags />
+                            <Times>
+                                <LastModificationTime>2018-10-16T10:18:05Z</LastModificationTime>
+                                <CreationTime>2018-10-16T10:18:01Z</CreationTime>
+                                <LastAccessTime>2018-10-16T10:18:01Z</LastAccessTime>
+                                <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                                <Expires>False</Expires>
+                                <UsageCount>0</UsageCount>
+                                <LocationChanged>2018-10-17T09:52:49Z</LocationChanged>
+                            </Times>
+                            <String>
+                                <Key>Title</Key>
+                                <Value>Entry 1</Value>
+                            </String>
+                            <String>
+                                <Key>UserName</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Password</Key>
+                                <Value Protected="True">1yeO0TxwNduEZ3pT</Value>
+                            </String>
+                            <String>
+                                <Key>URL</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Notes</Key>
+                                <Value />
+                            </String>
+                            <AutoType>
+                                <Enabled>True</Enabled>
+                                <DataTransferObfuscation>0</DataTransferObfuscation>
+                            </AutoType>
+                        </Entry>
+                    </History>
+                </Entry>
+                <Entry>
+                    <UUID>RL4QMkD2SrGboJVNst4woQ==</UUID>
+                    <IconID>0</IconID>
+                    <ForegroundColor />
+                    <BackgroundColor />
+                    <OverrideURL />
+                    <Tags />
+                    <Times>
+                        <LastModificationTime>2018-10-17T14:25:11Z</LastModificationTime>
+                        <CreationTime>2018-10-17T14:24:51Z</CreationTime>
+                        <LastAccessTime>2018-10-17T14:24:51Z</LastAccessTime>
+                        <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                        <Expires>False</Expires>
+                        <UsageCount>0</UsageCount>
+                        <LocationChanged>2018-10-17T14:24:51Z</LocationChanged>
+                    </Times>
+                    <String>
+                        <Key>Title</Key>
+                        <Value>Entry 2</Value>
+                    </String>
+                    <String>
+                        <Key>UserName</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Password</Key>
+                        <Value Protected="True">lsq+w7si</Value>
+                    </String>
+                    <String>
+                        <Key>URL</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Notes</Key>
+                        <Value />
+                    </String>
+                    <AutoType>
+                        <Enabled>True</Enabled>
+                        <DataTransferObfuscation>0</DataTransferObfuscation>
+                    </AutoType>
+                    <History>
+                        <Entry>
+                            <UUID>RL4QMkD2SrGboJVNst4woQ==</UUID>
+                            <IconID>0</IconID>
+                            <ForegroundColor />
+                            <BackgroundColor />
+                            <OverrideURL />
+                            <Tags />
+                            <Times>
+                                <LastModificationTime>2018-10-17T14:24:51Z</LastModificationTime>
+                                <CreationTime>2018-10-17T14:24:51Z</CreationTime>
+                                <LastAccessTime>2018-10-17T14:24:51Z</LastAccessTime>
+                                <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                                <Expires>False</Expires>
+                                <UsageCount>0</UsageCount>
+                                <LocationChanged>2018-10-17T14:24:51Z</LocationChanged>
+                            </Times>
+                            <String>
+                                <Key>Title</Key>
+                                <Value>New Entry</Value>
+                            </String>
+                            <String>
+                                <Key>UserName</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Password</Key>
+                                <Value Protected="True">yc+x2Cdhnw9Rgwnq</Value>
+                            </String>
+                            <String>
+                                <Key>URL</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Notes</Key>
+                                <Value />
+                            </String>
+                            <AutoType>
+                                <Enabled>True</Enabled>
+                                <DataTransferObfuscation>0</DataTransferObfuscation>
+                            </AutoType>
+                        </Entry>
+                        <Entry>
+                            <UUID>RL4QMkD2SrGboJVNst4woQ==</UUID>
+                            <IconID>0</IconID>
+                            <ForegroundColor />
+                            <BackgroundColor />
+                            <OverrideURL />
+                            <Tags />
+                            <Times>
+                                <LastModificationTime>2018-10-17T14:25:04Z</LastModificationTime>
+                                <CreationTime>2018-10-17T14:24:51Z</CreationTime>
+                                <LastAccessTime>2018-10-17T14:24:51Z</LastAccessTime>
+                                <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                                <Expires>False</Expires>
+                                <UsageCount>0</UsageCount>
+                                <LocationChanged>2018-10-17T14:24:51Z</LocationChanged>
+                            </Times>
+                            <String>
+                                <Key>Title</Key>
+                                <Value>Entry2</Value>
+                            </String>
+                            <String>
+                                <Key>UserName</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Password</Key>
+                                <Value Protected="True">NTFH7lFk</Value>
+                            </String>
+                            <String>
+                                <Key>URL</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Notes</Key>
+                                <Value />
+                            </String>
+                            <AutoType>
+                                <Enabled>True</Enabled>
+                                <DataTransferObfuscation>0</DataTransferObfuscation>
+                            </AutoType>
+                        </Entry>
+                    </History>
+                </Entry>
+                <Entry>
+                    <UUID>c7ZGVQBjT3KDdPEuuFviqQ==</UUID>
+                    <IconID>0</IconID>
+                    <ForegroundColor />
+                    <BackgroundColor />
+                    <OverrideURL />
+                    <Tags />
+                    <Times>
+                        <LastModificationTime>2018-10-17T18:41:02Z</LastModificationTime>
+                        <CreationTime>2018-10-17T18:40:56Z</CreationTime>
+                        <LastAccessTime>2018-10-17T18:40:56Z</LastAccessTime>
+                        <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                        <Expires>False</Expires>
+                        <UsageCount>0</UsageCount>
+                        <LocationChanged>2018-10-17T18:40:56Z</LocationChanged>
+                    </Times>
+                    <String>
+                        <Key>Title</Key>
+                        <Value>Entry 3</Value>
+                    </String>
+                    <String>
+                        <Key>UserName</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Password</Key>
+                        <Value Protected="True">Tw6tVG1Z</Value>
+                    </String>
+                    <String>
+                        <Key>URL</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Notes</Key>
+                        <Value />
+                    </String>
+                    <AutoType>
+                        <Enabled>True</Enabled>
+                        <DataTransferObfuscation>0</DataTransferObfuscation>
+                    </AutoType>
+                    <History>
+                        <Entry>
+                            <UUID>c7ZGVQBjT3KDdPEuuFviqQ==</UUID>
+                            <IconID>0</IconID>
+                            <ForegroundColor />
+                            <BackgroundColor />
+                            <OverrideURL />
+                            <Tags />
+                            <Times>
+                                <LastModificationTime>2018-10-17T18:40:56Z</LastModificationTime>
+                                <CreationTime>2018-10-17T18:40:56Z</CreationTime>
+                                <LastAccessTime>2018-10-17T18:40:56Z</LastAccessTime>
+                                <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                                <Expires>False</Expires>
+                                <UsageCount>0</UsageCount>
+                                <LocationChanged>2018-10-17T18:40:56Z</LocationChanged>
+                            </Times>
+                            <String>
+                                <Key>Title</Key>
+                                <Value>New Entry</Value>
+                            </String>
+                            <String>
+                                <Key>UserName</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Password</Key>
+                                <Value Protected="True">1evsOZnQVoFTqPwq</Value>
+                            </String>
+                            <String>
+                                <Key>URL</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Notes</Key>
+                                <Value />
+                            </String>
+                            <AutoType>
+                                <Enabled>True</Enabled>
+                                <DataTransferObfuscation>0</DataTransferObfuscation>
+                            </AutoType>
+                        </Entry>
+                    </History>
+                </Entry>
+                <Entry>
+                    <UUID>5FrhiZ4JTf6AiPp2Wvgzgg==</UUID>
+                    <IconID>0</IconID>
+                    <ForegroundColor />
+                    <BackgroundColor />
+                    <OverrideURL />
+                    <Tags />
+                    <Times>
+                        <LastModificationTime>2018-10-17T19:01:26Z</LastModificationTime>
+                        <CreationTime>2018-10-17T19:01:13Z</CreationTime>
+                        <LastAccessTime>2018-10-17T19:01:13Z</LastAccessTime>
+                        <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                        <Expires>False</Expires>
+                        <UsageCount>0</UsageCount>
+                        <LocationChanged>2018-10-17T19:01:13Z</LocationChanged>
+                    </Times>
+                    <String>
+                        <Key>Title</Key>
+                        <Value>Entry 4</Value>
+                    </String>
+                    <String>
+                        <Key>UserName</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Password</Key>
+                        <Value Protected="True">Fs63JQ1BrBPhbYpp</Value>
+                    </String>
+                    <String>
+                        <Key>URL</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Notes</Key>
+                        <Value />
+                    </String>
+                    <AutoType>
+                        <Enabled>True</Enabled>
+                        <DataTransferObfuscation>0</DataTransferObfuscation>
+                    </AutoType>
+                    <History>
+                        <Entry>
+                            <UUID>5FrhiZ4JTf6AiPp2Wvgzgg==</UUID>
+                            <IconID>0</IconID>
+                            <ForegroundColor />
+                            <BackgroundColor />
+                            <OverrideURL />
+                            <Tags />
+                            <Times>
+                                <LastModificationTime>2018-10-17T19:01:13Z</LastModificationTime>
+                                <CreationTime>2018-10-17T19:01:13Z</CreationTime>
+                                <LastAccessTime>2018-10-17T19:01:13Z</LastAccessTime>
+                                <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                                <Expires>False</Expires>
+                                <UsageCount>0</UsageCount>
+                                <LocationChanged>2018-10-17T19:01:13Z</LocationChanged>
+                            </Times>
+                            <String>
+                                <Key>Title</Key>
+                                <Value>New Entry</Value>
+                            </String>
+                            <String>
+                                <Key>UserName</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Password</Key>
+                                <Value Protected="True">4U9+0AWYGPgo0pHT</Value>
+                            </String>
+                            <String>
+                                <Key>URL</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Notes</Key>
+                                <Value />
+                            </String>
+                            <AutoType>
+                                <Enabled>True</Enabled>
+                                <DataTransferObfuscation>0</DataTransferObfuscation>
+                            </AutoType>
+                        </Entry>
+                    </History>
+                </Entry>
+                <Entry>
+                    <UUID>T9B/F4YoR0iqlIBmzZ6A8g==</UUID>
+                    <IconID>0</IconID>
+                    <ForegroundColor />
+                    <BackgroundColor />
+                    <OverrideURL />
+                    <Tags />
+                    <Times>
+                        <LastModificationTime>2018-10-17T19:01:34Z</LastModificationTime>
+                        <CreationTime>2018-10-17T19:01:28Z</CreationTime>
+                        <LastAccessTime>2018-10-17T19:01:28Z</LastAccessTime>
+                        <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                        <Expires>False</Expires>
+                        <UsageCount>0</UsageCount>
+                        <LocationChanged>2018-10-17T19:01:28Z</LocationChanged>
+                    </Times>
+                    <String>
+                        <Key>Title</Key>
+                        <Value>Entry5</Value>
+                    </String>
+                    <String>
+                        <Key>UserName</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Password</Key>
+                        <Value Protected="True">e58Q</Value>
+                    </String>
+                    <String>
+                        <Key>URL</Key>
+                        <Value />
+                    </String>
+                    <String>
+                        <Key>Notes</Key>
+                        <Value />
+                    </String>
+                    <AutoType>
+                        <Enabled>True</Enabled>
+                        <DataTransferObfuscation>0</DataTransferObfuscation>
+                    </AutoType>
+                    <History>
+                        <Entry>
+                            <UUID>T9B/F4YoR0iqlIBmzZ6A8g==</UUID>
+                            <IconID>0</IconID>
+                            <ForegroundColor />
+                            <BackgroundColor />
+                            <OverrideURL />
+                            <Tags />
+                            <Times>
+                                <LastModificationTime>2018-10-17T19:01:28Z</LastModificationTime>
+                                <CreationTime>2018-10-17T19:01:28Z</CreationTime>
+                                <LastAccessTime>2018-10-17T19:01:28Z</LastAccessTime>
+                                <ExpiryTime>4001-01-01T00:00:00Z</ExpiryTime>
+                                <Expires>False</Expires>
+                                <UsageCount>0</UsageCount>
+                                <LocationChanged>2018-10-17T19:01:28Z</LocationChanged>
+                            </Times>
+                            <String>
+                                <Key>Title</Key>
+                                <Value>New Entry</Value>
+                            </String>
+                            <String>
+                                <Key>UserName</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Password</Key>
+                                <Value Protected="True">gCutyEVhI7QA5blI</Value>
+                            </String>
+                            <String>
+                                <Key>URL</Key>
+                                <Value />
+                            </String>
+                            <String>
+                                <Key>Notes</Key>
+                                <Value />
+                            </String>
+                            <AutoType>
+                                <Enabled>True</Enabled>
+                                <DataTransferObfuscation>0</DataTransferObfuscation>
+                            </AutoType>
+                        </Entry>
+                    </History>
+                </Entry>
+            </Group>
+        </Group>
+        <DeletedObjects>
+            <DeletedObject>
+                <UUID>OjDGBkygSXyeOh33r/aDJQ==</UUID>
+                <DeletionTime>2018-10-17T14:06:27Z</DeletionTime>
+            </DeletedObject>
+        </DeletedObjects>
+    </Root>
+</KeePassFile>
+

+ 0 - 14
Package.swift

@@ -79,19 +79,5 @@ let package = Package(
         .target(
             name: "Twofish",
             dependencies: []),
-        
-        // MARK: Test Targets
-
-        .testTarget(
-            name: "KeePassTests",
-            dependencies: ["KeePass"]),
-
-        .testTarget(
-            name: "BinaryTests",
-            dependencies: ["Binary"]),
-
-        .testTarget(
-            name: "CryptoTests",
-            dependencies: ["Crypto"]),
     ]
 )

+ 6 - 6
Sources/KDBX/KeyDerivation.swift

@@ -32,8 +32,8 @@ extension AESKeyDerivation {
 
     convenience init(parameters: [String: Variant]) throws {
         guard
-            let seed = parameters[AESKeyDerivation.TransformSeedKey],
-            let rounds = parameters[AESKeyDerivation.TransformRoundsKey]
+            let seed    = parameters[AESKeyDerivation.TransformSeedKey],
+            let rounds  = parameters[AESKeyDerivation.TransformRoundsKey]
         else { throw KDBXError.corruptedDatabase }
 
         try self.init(seed: try seed.unwrap(),
@@ -54,11 +54,11 @@ extension Argon2 {
     
     convenience init(parameters: [String: Variant]) throws {
         guard
-            let salt = parameters[Argon2.SaltKey],
+            let salt        = parameters[Argon2.SaltKey],
             let parallelism = parameters[Argon2.ParallelismKey],
-            let memory = parameters[Argon2.MemoryKey],
-            let iterations = parameters[Argon2.IterationsKey],
-            let version = parameters[Argon2.VersionKey]
+            let memory      = parameters[Argon2.MemoryKey],
+            let iterations  = parameters[Argon2.IterationsKey],
+            let version     = parameters[Argon2.VersionKey]
         else { throw KDBXError.corruptedDatabase }
 
         self.init(salt:         try salt.unwrap(),

+ 2 - 0
Sources/KeePass/Entry.swift

@@ -28,6 +28,8 @@ public protocol Entry {
 
     associatedtype Fields: RandomAccessCollection where Fields.Element == Field
 
+    var times: Timestamp { get }
+
     var fields: Fields { get }
     
     mutating func set(_ field: Fields.Element)

+ 9 - 1
Sources/KeePass/Field.swift

@@ -23,5 +23,13 @@ public struct Field {
     public var name: String
     public var value: String?
     public var isProtected: Bool
-    public var isReadeOnly: Bool
 }
+
+public struct Times {
+    public let creationDate: Date
+    public var lastModifiedDate: Date
+    public var lastAccessDate: Date
+    public var expirationDate: Date?
+}
+
+

+ 14 - 10
Sources/KeePass/KDB.swift

@@ -61,6 +61,10 @@ extension KDB.Group: Group {
 }
 
 extension KDB.Entry: Entry {
+
+    public var times: Timestamp {
+         return self
+    }
     
     public var fields: [Field] {
         properties.compactMap { Field($0) }
@@ -73,6 +77,15 @@ extension KDB.Entry: Entry {
 
 }
 
+extension KDB.Entry: Timestamp {
+
+    public var expirationDate: Date? {
+        get { nil }
+        set { }
+    }
+
+}
+
 extension Field {
 
     init?(_ field: KDB.Property<KDB.Entry.`Type`>) {
@@ -80,28 +93,19 @@ extension Field {
         switch field.type {
         case .title:
             name = EntryFieldTitle
-            isReadeOnly = false
-            isProtected = false
         case .url:
             name = EntryFieldURL
-            isReadeOnly = false
-            isProtected = false
         case .username:
             name = EntryFieldUserName
-            isReadeOnly = false
-            isProtected = false
         case .password:
             name = EntryFieldPassword
-            isReadeOnly = false
-            isProtected = true
         case .notes:
             name = EntryFieldNotes
-            isReadeOnly = false
-            isProtected = false
         default:
             return nil
         }
 
         value = try? field.get()
+        isProtected = field.type == .password
     }
 }

+ 44 - 8
Sources/KeePass/KDBX.swift

@@ -21,6 +21,8 @@ import Binary
 import XML
 import KDBX
 
+let DateFormatter = ISO8601DateFormatter()
+
 extension KDBX.File: Database {
     public var root: Element { database.document.root.KeePassFile.Root }
 }
@@ -39,18 +41,21 @@ extension XML.Element {
 
 extension Field {
 
-    init(_ element: XML.Element) {
-        name = element.name
-        value = element.value
-        isProtected = false
-        isReadeOnly = false
+    init?(_ element: XML.Element) {
+        guard let key = element.Key.value else { return nil}
+        name = key
+
+        value = element.Value.value
+        isProtected = element.Value.attributes["Protected"] == "True"
     }
 }
 
 extension XML.Element: Entry {
 
+    public var times: Timestamp { self.Times }
+
     public var fields: [Field] {
-        allDescendants(where: { $0.name == "String" }).map { Field($0) }
+        allDescendants(where: { $0.name == "String" }).compactMap { Field($0) }
     }
 
     public func set(_ field: Field) {
@@ -60,6 +65,37 @@ extension XML.Element: Entry {
     }
 }
 
+extension XML.Element: Timestamp {
+
+    public var creationDate: Date {
+        self.CreationTime.date(formatter: DateFormatter) ?? .distantPast
+    }
+
+    public var lastModifiedDate: Date {
+        get { self.LastModificationTime.date(formatter: DateFormatter) ?? .distantPast }
+        set { self.LastModificationTime.value = DateFormatter.string(from: newValue) }
+    }
+
+    public var lastAccessDate: Date {
+        get { self.LastAccessTime.date(formatter: DateFormatter) ?? .distantPast }
+        set { self.LastAccessTime.value = DateFormatter.string(from: newValue) }
+    }
+
+    public var expirationDate: Date? {
+        get { self.ExpiryTime.date(formatter: DateFormatter) }
+        set {
+            if let value = newValue {
+                self.ExpiryTime.value = DateFormatter.string(from: value)
+                addChild(name: "Expires", value: "True")
+            } else {
+                self.ExpiryTime.value = DateFormatter.string(from: Date.distantFuture)
+                addChild(name: "Expires", value: "False")
+            }
+        }
+    }
+
+}
+
 extension XML.Element: Group {
 
     public var title: String {
@@ -76,11 +112,11 @@ extension XML.Element: Group {
     }
 
     public var entries: [Element] {
-        allDescendants(where: { $0.name == "Entry"})
+        allDescendants(where: { $0.name == "Entry" })
     }
 
     public var groups: [Element] {
-        allDescendants(where: { $0.name == "Group"})
+        allDescendants(where: { $0.name == "Group" })
     }
 
 }

+ 4 - 0
Sources/KeePass/KeePass.swift

@@ -50,4 +50,8 @@ public class KeePass {
         }
     }
 
+    public static func open(contentOf xml: URL) throws -> AnyDatabase {
+        return AnyDatabase ( try KDBX.File(xml: xml) )
+    }
+
 }

+ 26 - 0
Sources/KeePass/Timestamp.swift

@@ -0,0 +1,26 @@
+// Timestamp.swift
+// This file is part of KeePass.
+//
+// Copyright © 2019 Maxime Epain. All rights reserved.
+//
+// KeePass is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// KeePass is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with KeePass. If not, see <https://www.gnu.org/licenses/>.
+
+import Foundation
+
+public protocol Timestamp {
+    var creationDate: Date { get }
+    var lastModifiedDate: Date { get set }
+    var lastAccessDate: Date { get set }
+    var expirationDate: Date? { get set }
+}

+ 3 - 0
Sources/KeePass/TypeErasure.swift

@@ -104,11 +104,13 @@ public class AnyGroup: Group {
 // MARK: - Entry
 
 internal class _AnyEntryBoxBase: Entry {
+    internal var times: Timestamp { _abstract() }
     internal var fields: AnyRandomAccessCollection<Field> { _abstract() }
     internal func set(_ field: Field) { _abstract() }
 }
 
 internal final class _AnyEntryBox<Base>: _AnyEntryBoxBase where Base: Entry {
+    internal override var times: Timestamp { _base.times }
     internal override var fields: AnyRandomAccessCollection<Field> { AnyRandomAccessCollection<Field>(_base.fields) }
     internal override func set(_ field: Field) { _base.set(field) }
     internal var _base: Base
@@ -116,6 +118,7 @@ internal final class _AnyEntryBox<Base>: _AnyEntryBoxBase where Base: Entry {
 }
 
 public final class AnyEntry: Entry {
+    public var times: Timestamp { _box.times }
     public var fields: AnyRandomAccessCollection<Field> { _box.fields }
     public func set(_ field: Field) { _box.set(field) }
     internal let _box: _AnyEntryBoxBase

+ 11 - 1
Sources/XML/Element.swift

@@ -69,13 +69,23 @@ open class Element {
     }
 
     public subscript(dynamicMember member: String) -> Element {
-        return self[member]
+        self[member]
     }
 
     open func get<T>() throws -> T where T: LosslessStringConvertible {
         guard let string = value, let value = T(string) else { throw XMLError.valueConversionFailed }
         return value
     }
+
+    open func date(formatter: DateFormatter) -> Date? {
+        guard let value = value else { return nil }
+        return formatter.date(from: value)
+    }
+
+    open func date(formatter: ISO8601DateFormatter = ISO8601DateFormatter()) -> Date? {
+        guard let value = value else { return nil }
+        return formatter.date(from: value)
+    }
     
     /// Returns all of the elements with equal name as `self` **(nil if not exists)**.
     open var all: [Element]? { return parent?.children.filter { $0.name == self.name } }

+ 1 - 0
Tests/KeePassTests/KeePassTests.swift

@@ -2,6 +2,7 @@ import XCTest
 @testable import KeePass
 
 final class KeePassTests: XCTestCase {
+
     func testExample() {
 
     }