diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 3a34a49e..40ed99e7 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -9,7 +9,6 @@ /* Begin PBXBuildFile section */ 4C0104BB17C37BFC00173EF3 /* KPKLegacyHeaderUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C0104BA17C37BFC00173EF3 /* KPKLegacyHeaderUtility.m */; }; 4C0104BE17C37DA400173EF3 /* KPKXmlUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C0104BD17C37DA400173EF3 /* KPKXmlUtilities.m */; }; - 4C01C23F1764D2980016D5D0 /* KdbEntry+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C01C23E1764D2980016D5D0 /* KdbEntry+Undo.m */; }; 4C01C2421764D8980016D5D0 /* MPContextMenuHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C01C2411764D8980016D5D0 /* MPContextMenuHelper.m */; }; 4C01C245176500C40016D5D0 /* HNHLevelIndicatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C01C244176500C40016D5D0 /* HNHLevelIndicatorCell.m */; }; 4C055E74179620BF00BD2BAB /* NSString+Reference.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C055E73179620BF00BD2BAB /* NSString+Reference.m */; }; @@ -37,7 +36,6 @@ 4C19E500178E26EF002F2CD0 /* Test_Password_1234.kdbx in Resources */ = {isa = PBXBuildFile; fileRef = 4C19E4FF178E26EF002F2CD0 /* Test_Password_1234.kdbx */; }; 4C19E503178E2871002F2CD0 /* MPDatabasePasswordAndKeyfile.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C19E502178E2871002F2CD0 /* MPDatabasePasswordAndKeyfile.m */; }; 4C1DDCDD1711ECEB00C98DA3 /* PasswordCreatorWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C1DDCDC1711ECEB00C98DA3 /* PasswordCreatorWindow.xib */; }; - 4C22040D1746ED160054C916 /* KdbGroup+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C22040C1746ED160054C916 /* KdbGroup+Undo.m */; }; 4C245B76176E1E3D0086100E /* DDData.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C245A6A176E1E3C0086100E /* DDData.m */; }; 4C245B77176E1E3D0086100E /* DDNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C245A6C176E1E3C0086100E /* DDNumber.m */; }; 4C245B78176E1E3D0086100E /* DDRange.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C245A6E176E1E3C0086100E /* DDRange.m */; }; @@ -65,13 +63,7 @@ 4C245BF1176E1E3D0086100E /* DispatchQueueLogFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C245B72176E1E3D0086100E /* DispatchQueueLogFormatter.m */; }; 4C25D58716CF0FAA00F6806C /* EntryView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C25D58616CF0FAA00F6806C /* EntryView.xib */; }; 4C2671AD17A7D8FC00F3A645 /* HNHColorWell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2671AC17A7D8FC00F3A645 /* HNHColorWell.m */; }; - 4C2724CE1778EFB100FD8456 /* NSData+Random.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2724CD1778EFB100FD8456 /* NSData+Random.m */; }; - 4C2724D11778EFE300FD8456 /* NSString+Empty.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2724D01778EFE300FD8456 /* NSString+Empty.m */; }; - 4C2724D41778FA0700FD8456 /* NSDate+Packed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2724D31778FA0700FD8456 /* NSDate+Packed.m */; }; 4C2724D71778FF1A00FD8456 /* NSUUID+KeePassKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2724D61778FF1A00FD8456 /* NSUUID+KeePassKit.m */; }; - 4C2724DA17790E7C00FD8456 /* NSMutableData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2724D917790E7C00FD8456 /* NSMutableData+Base64.m */; }; - 4C2A6134177A1D5F00C9826C /* KPLErrorCodes.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2A6133177A1D5F00C9826C /* KPLErrorCodes.m */; }; - 4C2C4C2C16D3BE3700D49295 /* KdbGroup+MPTreeTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2C4C2B16D3BE3700D49295 /* KdbGroup+MPTreeTools.m */; }; 4C2C8B341787500E009649F3 /* UnprotectedWarningView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C2C8B331787500E009649F3 /* UnprotectedWarningView.xib */; }; 4C2E381D16D11FF900037A9D /* 03_ServerTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C2E381A16D11FF900037A9D /* 03_ServerTemplate.pdf */; }; 4C2E381E16D11FF900037A9D /* 04_KlipperTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C2E381B16D11FF900037A9D /* 04_KlipperTemplate.pdf */; }; @@ -83,20 +75,16 @@ 4C305F3E179A1A760082334F /* image.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C305F3D179A1A760082334F /* image.png */; }; 4C3666411787327E00B249F1 /* MPDocument+Attachments.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C3666401787327E00B249F1 /* MPDocument+Attachments.m */; }; 4C366643178748F500B249F1 /* 99_HarddiskTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C366642178748F500B249F1 /* 99_HarddiskTemplate.pdf */; }; - 4C36E5B4177CD4FB00152132 /* Kdb4Tree+KVOAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C36E5B3177CD4FB00152132 /* Kdb4Tree+KVOAdditions.m */; }; 4C37A6731769393300AD0A40 /* HNHTableHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C37A6721769393300AD0A40 /* HNHTableHeaderCell.m */; }; 4C37A84015B8B474005EF8EE /* MPOutlineDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C37A83F15B8B474005EF8EE /* MPOutlineDataSource.m */; }; 4C39B3F5178FEFAE0027DC7C /* KPKNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C39B3F4178FEFAE0027DC7C /* KPKNode.m */; }; 4C3BD51516D276F800389F1F /* MPToolbarDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C3BD51416D276F800389F1F /* MPToolbarDelegate.m */; }; 4C3D4C0817594CA40038DAAC /* HNHSeparator.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C3D4C0717594CA40038DAAC /* HNHSeparator.m */; }; - 4C3E1CC0177DEFB3003BD9BD /* StringField+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C3E1CBF177DEFB3003BD9BD /* StringField+Undo.m */; }; 4C3F28541791EDFD00703281 /* KPKErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C3F28531791EDFD00703281 /* KPKErrors.m */; }; 4C3FFD9E16DAF60600DF9186 /* FilterBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C3FFD9D16DAF60600DF9186 /* FilterBar.xib */; }; 4C431BCD16E2A82800700A81 /* MPPasteBoardController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C431BCC16E2A82700700A81 /* MPPasteBoardController.m */; }; 4C431BCF16E2BAB000700A81 /* OverlayWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C431BCE16E2BAB000700A81 /* OverlayWindow.xib */; }; 4C4436771792BE810099E220 /* KPKFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4436761792BE810099E220 /* KPKFormat.m */; }; - 4C4510091798C53700219998 /* StringField+Validation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4510081798C53700219998 /* StringField+Validation.m */; }; - 4C45100C1798C65C00219998 /* Kdb4Entry+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C45100B1798C65C00219998 /* Kdb4Entry+MPAdditions.m */; }; 4C45FB1C178E09ED0010007D /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C45FB1B178E09ED0010007D /* SenTestingKit.framework */; }; 4C45FB1D178E09ED0010007D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C77E36615B84A240093A587 /* Cocoa.framework */; }; 4C45FB23178E09ED0010007D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C45FB21178E09ED0010007D /* InfoPlist.strings */; }; @@ -105,7 +93,6 @@ 4C46B88517063A070046109A /* NSString+MPPasswordCreation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C46B88417063A070046109A /* NSString+MPPasswordCreation.m */; }; 4C46E09E17673A0A00DA62E8 /* HNHShadowBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C46E09D17673A0A00DA62E8 /* HNHShadowBox.m */; }; 4C4A100F176286FD00BBF2CA /* MPTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4A100E176286FD00BBF2CA /* MPTableView.m */; }; - 4C4A101217629DA900BBF2CA /* KdbGroup+KVOAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4A101117629DA900BBF2CA /* KdbGroup+KVOAdditions.m */; }; 4C4B7EE917A45EC6000234C7 /* MPDatePickingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4B7EE717A45EC5000234C7 /* MPDatePickingViewController.m */; }; 4C4B7EEA17A45EC6000234C7 /* DatePickingView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C4B7EE817A45EC5000234C7 /* DatePickingView.xib */; }; 4C4B7EEE17A467E1000234C7 /* MPGroupInspectorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4B7EEC17A467E1000234C7 /* MPGroupInspectorViewController.m */; }; @@ -114,7 +101,6 @@ 4C4B7EF417A467FC000234C7 /* EntryInspectorView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C4B7EF217A467FC000234C7 /* EntryInspectorView.xib */; }; 4C4B7EF817A4B335000234C7 /* MPUniqueCharactersFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4B7EF717A4B335000234C7 /* MPUniqueCharactersFormatter.m */; }; 4C4FCE15177CFE6B00BBF7AE /* MPCustomFieldTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4FCE14177CFE6B00BBF7AE /* MPCustomFieldTableCellView.m */; }; - 4C4FCE18177D03D700BBF7AE /* Kdb4Entry+KVOAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4FCE17177D03D700BBF7AE /* Kdb4Entry+KVOAdditions.m */; }; 4C52A244177D7B9F0000D88F /* HNHScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C52A243177D7B9F0000D88F /* HNHScrollView.m */; }; 4C52A88E1788628B00868229 /* 06_BlockDeviceTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C52A88B1788628B00868229 /* 06_BlockDeviceTemplate.pdf */; }; 4C52A88F1788628B00868229 /* 13_KeysTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C52A88C1788628B00868229 /* 13_KeysTemplate.pdf */; }; @@ -123,7 +109,6 @@ 4C5426F317BEEA8700A4424C /* Autotype_test.kdbx in Resources */ = {isa = PBXBuildFile; fileRef = 4C5426F217BEEA8700A4424C /* Autotype_test.kdbx */; }; 4C569D9E17652B0600595B62 /* MPConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C569D9D17652B0600595B62 /* MPConstants.m */; }; 4C569DA117652BFE00595B62 /* MPEntryTableDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C569DA017652BFE00595B62 /* MPEntryTableDataSource.m */; }; - 4C569DA417653F3500595B62 /* KdbEntry+MPTreeTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C569DA317653F3500595B62 /* KdbEntry+MPTreeTools.m */; }; 4C57AE1417BA422B00CA4F34 /* MPSegmentedContextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C57AE1317BA422B00CA4F34 /* MPSegmentedContextCell.m */; }; 4C586F9E16D07ABD00E7DB57 /* 00_PasswordTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C586F9D16D07ABD00E7DB57 /* 00_PasswordTemplate.pdf */; }; 4C586FA016D07D7200E7DB57 /* 01_PackageNetworkTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C586F9F16D07D7200E7DB57 /* 01_PackageNetworkTemplate.pdf */; }; @@ -134,7 +119,15 @@ 4C5A11FF1708DE8800223D8A /* PasswordCreatorView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C5A11FD1708DE8700223D8A /* PasswordCreatorView.xib */; }; 4C5AA591179549A1008ECAD7 /* KPKXmlTreeWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5AA590179549A1008ECAD7 /* KPKXmlTreeWriter.m */; }; 4C5BF67B175C01F300D53DF7 /* MPUppercaseStringValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5BF67A175C01F300D53DF7 /* MPUppercaseStringValueTransformer.m */; }; - 4C5EC302177B700D00DA955B /* MPRootAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5EC301177B700D00DA955B /* MPRootAdapter.m */; }; + 4C5CD35517D15DBD000B7F38 /* NSData+Gzip.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CD34A17D15DBD000B7F38 /* NSData+Gzip.m */; }; + 4C5CD35617D15DBD000B7F38 /* NSData+Random.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CD34C17D15DBD000B7F38 /* NSData+Random.m */; }; + 4C5CD35717D15DBD000B7F38 /* NSDate+Packed.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CD34E17D15DBD000B7F38 /* NSDate+Packed.m */; }; + 4C5CD35817D15DBD000B7F38 /* NSMutableData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CD35017D15DBD000B7F38 /* NSMutableData+Base64.m */; }; + 4C5CD35917D15DBD000B7F38 /* NSString+Empty.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CD35217D15DBD000B7F38 /* NSString+Empty.m */; }; + 4C5CD35A17D15DBD000B7F38 /* NSString+Hexdata.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CD35417D15DBD000B7F38 /* NSString+Hexdata.m */; }; + 4C5CD36117D15DCA000B7F38 /* KPKArc4RandomStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CD35C17D15DCA000B7F38 /* KPKArc4RandomStream.m */; }; + 4C5CD36217D15DCA000B7F38 /* KPKRandomStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CD35E17D15DCA000B7F38 /* KPKRandomStream.m */; }; + 4C5CD36317D15DCA000B7F38 /* KPKSalsa20RandomStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CD36017D15DCA000B7F38 /* KPKSalsa20RandomStream.m */; }; 4C5FA86D17A5F26800C781C9 /* KPKDataStreamWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5FA86C17A5F26800C781C9 /* KPKDataStreamWriter.m */; }; 4C5FE9AE17843CE20001D5A8 /* MPSelectedAttachmentTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C5FE9AD17843CE20001D5A8 /* MPSelectedAttachmentTableCellView.m */; }; 4C61EA0316D2FD0800AC519E /* MPOutlineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C61EA0216D2FD0800AC519E /* MPOutlineViewController.m */; }; @@ -147,37 +140,6 @@ 4C63B8FB17A3154D0091BD72 /* MPContextToolbarButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C63B8FA17A3154D0091BD72 /* MPContextToolbarButton.m */; }; 4C65C79C16DD283900E32CFF /* MPToolbarButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C65C79B16DD283900E32CFF /* MPToolbarButton.m */; }; 4C65FAE916D16DDB006E0577 /* MPPasswordInputController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C65FAE716D16DDB006E0577 /* MPPasswordInputController.m */; }; - 4C669B7F16760ED100DD0774 /* AesInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B3116760ED100DD0774 /* AesInputStream.m */; }; - 4C669B8016760ED100DD0774 /* AesOutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B3316760ED100DD0774 /* AesOutputStream.m */; }; - 4C669B8116760ED100DD0774 /* Arc4RandomStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B3516760ED100DD0774 /* Arc4RandomStream.m */; }; - 4C669B8216760ED100DD0774 /* DataInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B3716760ED100DD0774 /* DataInputStream.m */; }; - 4C669B8316760ED100DD0774 /* DataOutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B3916760ED100DD0774 /* DataOutputStream.m */; }; - 4C669B8416760ED100DD0774 /* FileInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B3B16760ED100DD0774 /* FileInputStream.m */; }; - 4C669B8516760ED100DD0774 /* FileOutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B3D16760ED100DD0774 /* FileOutputStream.m */; }; - 4C669B8616760ED100DD0774 /* GZipInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B3F16760ED100DD0774 /* GZipInputStream.m */; }; - 4C669B8716760ED100DD0774 /* GZipOutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B4116760ED100DD0774 /* GZipOutputStream.m */; }; - 4C669B8816760ED100DD0774 /* HashedInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B4316760ED100DD0774 /* HashedInputStream.m */; }; - 4C669B8916760ED100DD0774 /* HashedOutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B4516760ED100DD0774 /* HashedOutputStream.m */; }; - 4C669B8A16760ED100DD0774 /* InputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B4716760ED100DD0774 /* InputStream.m */; }; - 4C669B8B16760ED100DD0774 /* OutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B4916760ED100DD0774 /* OutputStream.m */; }; - 4C669B8C16760ED100DD0774 /* Sha256OutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B4B16760ED100DD0774 /* Sha256OutputStream.m */; }; - 4C669B9016760ED100DD0774 /* DDXMLElement+MKPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B5416760ED100DD0774 /* DDXMLElement+MKPAdditions.m */; }; - 4C669B9116760ED100DD0774 /* Kdb.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B5616760ED100DD0774 /* Kdb.m */; }; - 4C669B9316760ED100DD0774 /* Kdb3Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B5A16760ED100DD0774 /* Kdb3Node.m */; }; - 4C669B9416760ED100DD0774 /* Kdb3Reader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B5C16760ED100DD0774 /* Kdb3Reader.m */; }; - 4C669B9516760ED100DD0774 /* Kdb3Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B5E16760ED100DD0774 /* Kdb3Utils.m */; }; - 4C669B9616760ED100DD0774 /* Kdb3Writer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B6016760ED100DD0774 /* Kdb3Writer.m */; }; - 4C669B9716760ED100DD0774 /* Kdb4Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B6216760ED100DD0774 /* Kdb4Node.m */; }; - 4C669B9816760ED100DD0774 /* Kdb4Parser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B6416760ED100DD0774 /* Kdb4Parser.m */; }; - 4C669B9916760ED100DD0774 /* Kdb4Persist.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B6616760ED100DD0774 /* Kdb4Persist.m */; }; - 4C669B9A16760ED100DD0774 /* Kdb4Reader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B6816760ED100DD0774 /* Kdb4Reader.m */; }; - 4C669B9B16760ED100DD0774 /* Kdb4Writer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B6A16760ED100DD0774 /* Kdb4Writer.m */; }; - 4C669B9C16760ED100DD0774 /* KdbPassword.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B6D16760ED100DD0774 /* KdbPassword.m */; }; - 4C669B9D16760ED100DD0774 /* KdbReaderFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B7016760ED100DD0774 /* KdbReaderFactory.m */; }; - 4C669B9E16760ED100DD0774 /* KdbWriterFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B7316760ED100DD0774 /* KdbWriterFactory.m */; }; - 4C669B9F16760ED100DD0774 /* RandomStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B7516760ED100DD0774 /* RandomStream.m */; }; - 4C669BA016760ED100DD0774 /* Salsa20RandomStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B7716760ED100DD0774 /* Salsa20RandomStream.m */; }; - 4C669BA216760ED100DD0774 /* UUID.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C669B7B16760ED100DD0774 /* UUID.m */; }; 4C67D33017981A2B00A7BDFC /* HNHTokenField.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C67D32F17981A2B00A7BDFC /* HNHTokenField.m */; }; 4C67D33317981ABA00A7BDFC /* HNHTokenFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C67D33217981ABA00A7BDFC /* HNHTokenFieldCell.m */; }; 4C68456A17BC21DD00FCDBFC /* KPKAutotype.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C68456917BC21DD00FCDBFC /* KPKAutotype.m */; }; @@ -215,12 +177,9 @@ 4C7ABA4C17BAEC6700FF5799 /* 20_MiscTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C7ABA4717BAEC6700FF5799 /* 20_MiscTemplate.pdf */; }; 4C7ABA4E17BAEC7000FF5799 /* addEntryTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C7ABA4D17BAEC7000FF5799 /* addEntryTemplate.pdf */; }; 4C7F35681779DFFB00C57890 /* Errors.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C7F356A1779DFFB00C57890 /* Errors.strings */; }; - 4C801AFC179310E2002821E3 /* NSString+Hexdata.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C801AFB179310E2002821E3 /* NSString+Hexdata.m */; }; 4C80BB6F176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C80BB6E176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m */; }; 4C811C8316ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */; }; 4C83814215BF4677001AE468 /* MPDocumentWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C83814115BF4677001AE468 /* MPDocumentWindowController.m */; }; - 4C83F4AA1774B155006C5FC0 /* Kdb3Tree+NewTree.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C83F4A91774B155006C5FC0 /* Kdb3Tree+NewTree.m */; }; - 4C83F4AD1774B25F006C5FC0 /* Kdb4Tree+NewTree.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C83F4AC1774B25F006C5FC0 /* Kdb4Tree+NewTree.m */; }; 4C888C9016EB6C91003D34A1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C888C8E16EB6C91003D34A1 /* Localizable.strings */; }; 4C888C9316EB6F5E003D34A1 /* MPToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C888C9216EB6F5E003D34A1 /* MPToolbarItem.m */; }; 4C888C9716EB754B003D34A1 /* MPActionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C888C9616EB754B003D34A1 /* MPActionHelper.m */; }; @@ -252,12 +211,11 @@ 4CBA561617C2EA4900CE13D3 /* KPKTestXmlWriting.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CBA561517C2EA4900CE13D3 /* KPKTestXmlWriting.m */; }; 4CC0D2CE17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC0D2CD17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m */; }; 4CC0D2D117974A5A000B4BDA /* MPAttachmentTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC0D2D017974A5A000B4BDA /* MPAttachmentTableViewDelegate.m */; }; - 4CC1AEBE16D4467C006D2AAB /* KdbTree+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */; }; 4CC299FF176F99E50050C939 /* MPRequestHandlerService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC299FE176F99E50050C939 /* MPRequestHandlerService.m */; }; 4CC29A02176F9D140050C939 /* MPTestAssociateRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC29A01176F9D140050C939 /* MPTestAssociateRequestHandler.m */; }; 4CC3AABD175F4983003EF01B /* HNHRoundedTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC3AAB9175F4983003EF01B /* HNHRoundedTextFieldCell.m */; }; - 4CC672791781D0C0006DEDCF /* KdbGroup+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC672781781D0C0006DEDCF /* KdbGroup+MPAdditions.m */; }; - 4CC6727C1781D0D2006DEDCF /* KdbEntry+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6727B1781D0D2006DEDCF /* KdbEntry+MPAdditions.m */; }; + 4CC6DB7A17D23719002C6091 /* KPKNode+IconImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6DB7917D23719002C6091 /* KPKNode+IconImage.m */; }; + 4CC6DB7D17D23DCE002C6091 /* KPKUTIs.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6DB7C17D23DCE002C6091 /* KPKUTIs.m */; }; 4CC7EA1B17807E7E0089D4F3 /* HNHRoundedTextFieldCellHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7EA1A17807E7E0089D4F3 /* HNHRoundedTextFieldCellHelper.m */; }; 4CCEDE2A179F203B008402BE /* MPOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE29179F203B008402BE /* MPOutlineView.m */; }; 4CCEDE2E179F213B008402BE /* MPNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE2D179F213B008402BE /* MPNotifications.m */; }; @@ -291,9 +249,7 @@ 4CEAF85717BA9B1D001307A6 /* Keepass2Key.xml in Resources */ = {isa = PBXBuildFile; fileRef = 4CEAF85617BA9B1D001307A6 /* Keepass2Key.xml */; }; 4CEAF85B17BA9B44001307A6 /* KPKTestKeyfileParsing.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEAF85A17BA9B44001307A6 /* KPKTestKeyfileParsing.m */; }; 4CECB31717AC326D00EAFB0F /* KPKTestLegacyWriting.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CECB31617AC326D00EAFB0F /* KPKTestLegacyWriting.m */; }; - 4CF1F0CA1786B37900CD920E /* NSData+Gzip.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF1F0C81786B37900CD920E /* NSData+Gzip.m */; }; 4CF29BF417879D0000851B60 /* 26_FileSaveTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4CF29BF317879D0000851B60 /* 26_FileSaveTemplate.pdf */; }; - 4CF4FEE017AEA4A400712774 /* UUID+Pasterboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF4FEDF17AEA4A400712774 /* UUID+Pasterboard.m */; }; 4CF62B86179385D700B660B6 /* KPKAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF62B85179385D700B660B6 /* KPKAttribute.m */; }; 4CF6C711176F4533007A811D /* MPStringLengthValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF6C710176F4533007A811D /* MPStringLengthValueTransformer.m */; }; 4CF6C718176F5234007A811D /* MPAssociateRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF6C717176F5234007A811D /* MPAssociateRequestHandler.m */; }; @@ -302,12 +258,10 @@ 4CF7805D176E71170032EE71 /* MPServerDaemon.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF7805C176E71170032EE71 /* MPServerDaemon.m */; }; 4CF7805F176E75110032EE71 /* ServerSettings.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CF7805E176E75110032EE71 /* ServerSettings.xib */; }; 4CF78064176E75AD0032EE71 /* MPServerSettingsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CF78063176E75AD0032EE71 /* MPServerSettingsController.m */; }; - 4CFB5E9F17AAD20200D9B10C /* Kdb4Group+Undo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFB5E9E17AAD20200D9B10C /* Kdb4Group+Undo.m */; }; 4CFC53BF16E94729007396BE /* MPShadowBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFC53BE16E94729007396BE /* MPShadowBox.m */; }; 4CFC873B179DEDF3000DFC03 /* KPKMetaData.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFC873A179DEDF3000DFC03 /* KPKMetaData.m */; }; 4CFC873E179DF200000DFC03 /* KPKTimeInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFC873D179DF200000DFC03 /* KPKTimeInfo.m */; }; 4CFC8743179DFD3E000DFC03 /* KPKTestXmlLoading.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFC8742179DFD3E000DFC03 /* KPKTestXmlLoading.m */; }; - 4CFEB36E1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFEB36D1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -316,8 +270,6 @@ 4C0104BC17C37C2B00173EF3 /* KPKXmlUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKXmlUtilities.h; sourceTree = ""; }; 4C0104BD17C37DA400173EF3 /* KPKXmlUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKXmlUtilities.m; sourceTree = ""; }; 4C0104BF17C37DFC00173EF3 /* KPKTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKTypes.h; sourceTree = ""; }; - 4C01C23D1764D2980016D5D0 /* KdbEntry+Undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbEntry+Undo.h"; sourceTree = ""; }; - 4C01C23E1764D2980016D5D0 /* KdbEntry+Undo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbEntry+Undo.m"; sourceTree = ""; }; 4C01C2401764D8980016D5D0 /* MPContextMenuHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPContextMenuHelper.h; sourceTree = ""; }; 4C01C2411764D8980016D5D0 /* MPContextMenuHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPContextMenuHelper.m; sourceTree = ""; }; 4C01C243176500C40016D5D0 /* HNHLevelIndicatorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHLevelIndicatorCell.h; sourceTree = ""; }; @@ -372,8 +324,6 @@ 4C19E501178E2871002F2CD0 /* MPDatabasePasswordAndKeyfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDatabasePasswordAndKeyfile.h; sourceTree = ""; }; 4C19E502178E2871002F2CD0 /* MPDatabasePasswordAndKeyfile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDatabasePasswordAndKeyfile.m; sourceTree = ""; }; 4C1DDCDC1711ECEB00C98DA3 /* PasswordCreatorWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PasswordCreatorWindow.xib; sourceTree = ""; }; - 4C22040B1746ED160054C916 /* KdbGroup+Undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbGroup+Undo.h"; sourceTree = ""; }; - 4C22040C1746ED160054C916 /* KdbGroup+Undo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbGroup+Undo.m"; sourceTree = ""; }; 4C245A69176E1E3C0086100E /* DDData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDData.h; sourceTree = ""; }; 4C245A6A176E1E3C0086100E /* DDData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DDData.m; sourceTree = ""; }; 4C245A6B176E1E3C0086100E /* DDNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DDNumber.h; sourceTree = ""; }; @@ -429,20 +379,8 @@ 4C25D58616CF0FAA00F6806C /* EntryView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = EntryView.xib; sourceTree = ""; }; 4C2671AB17A7D8FC00F3A645 /* HNHColorWell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHColorWell.h; sourceTree = ""; }; 4C2671AC17A7D8FC00F3A645 /* HNHColorWell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHColorWell.m; sourceTree = ""; }; - 4C2724CC1778EFB100FD8456 /* NSData+Random.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Random.h"; sourceTree = ""; }; - 4C2724CD1778EFB100FD8456 /* NSData+Random.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Random.m"; sourceTree = ""; }; - 4C2724CF1778EFE300FD8456 /* NSString+Empty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Empty.h"; sourceTree = ""; }; - 4C2724D01778EFE300FD8456 /* NSString+Empty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Empty.m"; sourceTree = ""; }; - 4C2724D21778FA0700FD8456 /* NSDate+Packed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Packed.h"; sourceTree = ""; }; - 4C2724D31778FA0700FD8456 /* NSDate+Packed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Packed.m"; sourceTree = ""; }; 4C2724D51778FF1A00FD8456 /* NSUUID+KeePassKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSUUID+KeePassKit.h"; sourceTree = ""; }; 4C2724D61778FF1A00FD8456 /* NSUUID+KeePassKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSUUID+KeePassKit.m"; sourceTree = ""; }; - 4C2724D817790E7C00FD8456 /* NSMutableData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableData+Base64.h"; sourceTree = ""; }; - 4C2724D917790E7C00FD8456 /* NSMutableData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableData+Base64.m"; sourceTree = ""; }; - 4C2A6132177A181300C9826C /* KPLErrorCodes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPLErrorCodes.h; sourceTree = ""; }; - 4C2A6133177A1D5F00C9826C /* KPLErrorCodes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPLErrorCodes.m; sourceTree = ""; }; - 4C2C4C2A16D3BE3700D49295 /* KdbGroup+MPTreeTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbGroup+MPTreeTools.h"; sourceTree = ""; }; - 4C2C4C2B16D3BE3700D49295 /* KdbGroup+MPTreeTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbGroup+MPTreeTools.m"; sourceTree = ""; }; 4C2C8B331787500E009649F3 /* UnprotectedWarningView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UnprotectedWarningView.xib; sourceTree = ""; }; 4C2E381A16D11FF900037A9D /* 03_ServerTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 03_ServerTemplate.pdf; sourceTree = ""; }; 4C2E381B16D11FF900037A9D /* 04_KlipperTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 04_KlipperTemplate.pdf; sourceTree = ""; }; @@ -458,8 +396,6 @@ 4C305F3D179A1A760082334F /* image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = image.png; path = Images/image.png; sourceTree = ""; }; 4C3666401787327E00B249F1 /* MPDocument+Attachments.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPDocument+Attachments.m"; sourceTree = ""; }; 4C366642178748F500B249F1 /* 99_HarddiskTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = 99_HarddiskTemplate.pdf; path = Icons/99_HarddiskTemplate.pdf; sourceTree = ""; }; - 4C36E5B2177CD4FB00152132 /* Kdb4Tree+KVOAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Kdb4Tree+KVOAdditions.h"; sourceTree = ""; }; - 4C36E5B3177CD4FB00152132 /* Kdb4Tree+KVOAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Kdb4Tree+KVOAdditions.m"; sourceTree = ""; }; 4C37A6711769393300AD0A40 /* HNHTableHeaderCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHTableHeaderCell.h; sourceTree = ""; }; 4C37A6721769393300AD0A40 /* HNHTableHeaderCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHTableHeaderCell.m; sourceTree = ""; }; 4C37A83E15B8B474005EF8EE /* MPOutlineDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPOutlineDataSource.h; sourceTree = ""; }; @@ -470,8 +406,6 @@ 4C3BD51416D276F800389F1F /* MPToolbarDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPToolbarDelegate.m; sourceTree = ""; }; 4C3D4C0617594CA40038DAAC /* HNHSeparator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHSeparator.h; sourceTree = ""; }; 4C3D4C0717594CA40038DAAC /* HNHSeparator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHSeparator.m; sourceTree = ""; }; - 4C3E1CBE177DEFB3003BD9BD /* StringField+Undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "StringField+Undo.h"; sourceTree = ""; }; - 4C3E1CBF177DEFB3003BD9BD /* StringField+Undo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "StringField+Undo.m"; sourceTree = ""; }; 4C3F28521791EDE800703281 /* KPKErrors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKErrors.h; sourceTree = ""; }; 4C3F28531791EDFD00703281 /* KPKErrors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKErrors.m; sourceTree = ""; }; 4C3FFD9D16DAF60600DF9186 /* FilterBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FilterBar.xib; sourceTree = ""; }; @@ -480,10 +414,6 @@ 4C431BCE16E2BAB000700A81 /* OverlayWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OverlayWindow.xib; sourceTree = ""; }; 4C4436751792BE810099E220 /* KPKFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KPKFormat.h; path = Format/KPKFormat.h; sourceTree = ""; }; 4C4436761792BE810099E220 /* KPKFormat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = KPKFormat.m; path = Format/KPKFormat.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 4C4510071798C53700219998 /* StringField+Validation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "StringField+Validation.h"; sourceTree = ""; }; - 4C4510081798C53700219998 /* StringField+Validation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "StringField+Validation.m"; sourceTree = ""; }; - 4C45100A1798C65C00219998 /* Kdb4Entry+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Kdb4Entry+MPAdditions.h"; sourceTree = ""; }; - 4C45100B1798C65C00219998 /* Kdb4Entry+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Kdb4Entry+MPAdditions.m"; sourceTree = ""; }; 4C45FB1A178E09ED0010007D /* MacPassTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MacPassTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; 4C45FB1B178E09ED0010007D /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; 4C45FB20178E09ED0010007D /* MacPassTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MacPassTests-Info.plist"; sourceTree = ""; }; @@ -499,8 +429,6 @@ 4C46E09D17673A0A00DA62E8 /* HNHShadowBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHShadowBox.m; sourceTree = ""; }; 4C4A100D176286FD00BBF2CA /* MPTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableView.h; sourceTree = ""; }; 4C4A100E176286FD00BBF2CA /* MPTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableView.m; sourceTree = ""; }; - 4C4A101017629DA900BBF2CA /* KdbGroup+KVOAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbGroup+KVOAdditions.h"; sourceTree = ""; }; - 4C4A101117629DA900BBF2CA /* KdbGroup+KVOAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbGroup+KVOAdditions.m"; sourceTree = ""; }; 4C4B7EE617A45EC5000234C7 /* MPDatePickingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDatePickingViewController.h; sourceTree = ""; }; 4C4B7EE717A45EC5000234C7 /* MPDatePickingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDatePickingViewController.m; sourceTree = ""; }; 4C4B7EE817A45EC5000234C7 /* DatePickingView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DatePickingView.xib; sourceTree = ""; }; @@ -514,8 +442,6 @@ 4C4B7EF717A4B335000234C7 /* MPUniqueCharactersFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUniqueCharactersFormatter.m; sourceTree = ""; }; 4C4FCE13177CFE6B00BBF7AE /* MPCustomFieldTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCustomFieldTableCellView.h; sourceTree = ""; }; 4C4FCE14177CFE6B00BBF7AE /* MPCustomFieldTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCustomFieldTableCellView.m; sourceTree = ""; }; - 4C4FCE16177D03D700BBF7AE /* Kdb4Entry+KVOAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Kdb4Entry+KVOAdditions.h"; sourceTree = ""; }; - 4C4FCE17177D03D700BBF7AE /* Kdb4Entry+KVOAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Kdb4Entry+KVOAdditions.m"; sourceTree = ""; }; 4C52A242177D7B9F0000D88F /* HNHScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHScrollView.h; sourceTree = ""; }; 4C52A243177D7B9F0000D88F /* HNHScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHScrollView.m; sourceTree = ""; }; 4C52A88B1788628B00868229 /* 06_BlockDeviceTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 06_BlockDeviceTemplate.pdf; sourceTree = ""; }; @@ -527,8 +453,6 @@ 4C569D9D17652B0600595B62 /* MPConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConstants.m; sourceTree = ""; }; 4C569D9F17652BFE00595B62 /* MPEntryTableDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEntryTableDataSource.h; sourceTree = ""; }; 4C569DA017652BFE00595B62 /* MPEntryTableDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEntryTableDataSource.m; sourceTree = ""; }; - 4C569DA217653F3500595B62 /* KdbEntry+MPTreeTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbEntry+MPTreeTools.h"; sourceTree = ""; }; - 4C569DA317653F3500595B62 /* KdbEntry+MPTreeTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbEntry+MPTreeTools.m"; sourceTree = ""; }; 4C57AE1217BA422B00CA4F34 /* MPSegmentedContextCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSegmentedContextCell.h; sourceTree = ""; }; 4C57AE1317BA422B00CA4F34 /* MPSegmentedContextCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSegmentedContextCell.m; sourceTree = ""; }; 4C586F9D16D07ABD00E7DB57 /* 00_PasswordTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 00_PasswordTemplate.pdf; sourceTree = ""; }; @@ -556,8 +480,24 @@ 4C5CD34617D15912000B7F38 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/MainMenu.strings; sourceTree = ""; }; 4C5CD34717D1591A000B7F38 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/PasswordInputView.strings; sourceTree = ""; }; 4C5CD34817D15920000B7F38 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InspectorView.strings; sourceTree = ""; }; - 4C5EC300177B700D00DA955B /* MPRootAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRootAdapter.h; sourceTree = ""; }; - 4C5EC301177B700D00DA955B /* MPRootAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRootAdapter.m; sourceTree = ""; }; + 4C5CD34917D15DBD000B7F38 /* NSData+Gzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Gzip.h"; sourceTree = ""; }; + 4C5CD34A17D15DBD000B7F38 /* NSData+Gzip.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Gzip.m"; sourceTree = ""; }; + 4C5CD34B17D15DBD000B7F38 /* NSData+Random.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Random.h"; sourceTree = ""; }; + 4C5CD34C17D15DBD000B7F38 /* NSData+Random.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Random.m"; sourceTree = ""; }; + 4C5CD34D17D15DBD000B7F38 /* NSDate+Packed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Packed.h"; sourceTree = ""; }; + 4C5CD34E17D15DBD000B7F38 /* NSDate+Packed.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+Packed.m"; sourceTree = ""; }; + 4C5CD34F17D15DBD000B7F38 /* NSMutableData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableData+Base64.h"; sourceTree = ""; }; + 4C5CD35017D15DBD000B7F38 /* NSMutableData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableData+Base64.m"; sourceTree = ""; }; + 4C5CD35117D15DBD000B7F38 /* NSString+Empty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Empty.h"; sourceTree = ""; }; + 4C5CD35217D15DBD000B7F38 /* NSString+Empty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Empty.m"; sourceTree = ""; }; + 4C5CD35317D15DBD000B7F38 /* NSString+Hexdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Hexdata.h"; sourceTree = ""; }; + 4C5CD35417D15DBD000B7F38 /* NSString+Hexdata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Hexdata.m"; sourceTree = ""; }; + 4C5CD35B17D15DCA000B7F38 /* KPKArc4RandomStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKArc4RandomStream.h; sourceTree = ""; }; + 4C5CD35C17D15DCA000B7F38 /* KPKArc4RandomStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKArc4RandomStream.m; sourceTree = ""; }; + 4C5CD35D17D15DCA000B7F38 /* KPKRandomStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKRandomStream.h; sourceTree = ""; }; + 4C5CD35E17D15DCA000B7F38 /* KPKRandomStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKRandomStream.m; sourceTree = ""; }; + 4C5CD35F17D15DCA000B7F38 /* KPKSalsa20RandomStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKSalsa20RandomStream.h; sourceTree = ""; }; + 4C5CD36017D15DCA000B7F38 /* KPKSalsa20RandomStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKSalsa20RandomStream.m; sourceTree = ""; }; 4C5FA86B17A5F26800C781C9 /* KPKDataStreamWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKDataStreamWriter.h; sourceTree = ""; }; 4C5FA86C17A5F26800C781C9 /* KPKDataStreamWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKDataStreamWriter.m; sourceTree = ""; }; 4C5FE9AC17843CE20001D5A8 /* MPSelectedAttachmentTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSelectedAttachmentTableCellView.h; sourceTree = ""; }; @@ -578,71 +518,6 @@ 4C65C79B16DD283900E32CFF /* MPToolbarButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPToolbarButton.m; sourceTree = ""; }; 4C65FAE616D16DDB006E0577 /* MPPasswordInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPasswordInputController.h; sourceTree = ""; }; 4C65FAE716D16DDB006E0577 /* MPPasswordInputController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPPasswordInputController.m; sourceTree = ""; }; - 4C669B3016760ED100DD0774 /* AesInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AesInputStream.h; sourceTree = ""; }; - 4C669B3116760ED100DD0774 /* AesInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AesInputStream.m; sourceTree = ""; }; - 4C669B3216760ED100DD0774 /* AesOutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AesOutputStream.h; sourceTree = ""; }; - 4C669B3316760ED100DD0774 /* AesOutputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AesOutputStream.m; sourceTree = ""; }; - 4C669B3416760ED100DD0774 /* Arc4RandomStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Arc4RandomStream.h; sourceTree = ""; }; - 4C669B3516760ED100DD0774 /* Arc4RandomStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Arc4RandomStream.m; sourceTree = ""; }; - 4C669B3616760ED100DD0774 /* DataInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataInputStream.h; sourceTree = ""; }; - 4C669B3716760ED100DD0774 /* DataInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataInputStream.m; sourceTree = ""; }; - 4C669B3816760ED100DD0774 /* DataOutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataOutputStream.h; sourceTree = ""; }; - 4C669B3916760ED100DD0774 /* DataOutputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataOutputStream.m; sourceTree = ""; }; - 4C669B3A16760ED100DD0774 /* FileInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileInputStream.h; sourceTree = ""; }; - 4C669B3B16760ED100DD0774 /* FileInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileInputStream.m; sourceTree = ""; }; - 4C669B3C16760ED100DD0774 /* FileOutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileOutputStream.h; sourceTree = ""; }; - 4C669B3D16760ED100DD0774 /* FileOutputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileOutputStream.m; sourceTree = ""; }; - 4C669B3E16760ED100DD0774 /* GZipInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GZipInputStream.h; sourceTree = ""; }; - 4C669B3F16760ED100DD0774 /* GZipInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GZipInputStream.m; sourceTree = ""; }; - 4C669B4016760ED100DD0774 /* GZipOutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GZipOutputStream.h; sourceTree = ""; }; - 4C669B4116760ED100DD0774 /* GZipOutputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GZipOutputStream.m; sourceTree = ""; }; - 4C669B4216760ED100DD0774 /* HashedInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HashedInputStream.h; sourceTree = ""; }; - 4C669B4316760ED100DD0774 /* HashedInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HashedInputStream.m; sourceTree = ""; }; - 4C669B4416760ED100DD0774 /* HashedOutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HashedOutputStream.h; sourceTree = ""; }; - 4C669B4516760ED100DD0774 /* HashedOutputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HashedOutputStream.m; sourceTree = ""; }; - 4C669B4616760ED100DD0774 /* InputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputStream.h; sourceTree = ""; }; - 4C669B4716760ED100DD0774 /* InputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InputStream.m; sourceTree = ""; }; - 4C669B4816760ED100DD0774 /* OutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputStream.h; sourceTree = ""; }; - 4C669B4916760ED100DD0774 /* OutputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OutputStream.m; sourceTree = ""; }; - 4C669B4A16760ED100DD0774 /* Sha256OutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sha256OutputStream.h; sourceTree = ""; }; - 4C669B4B16760ED100DD0774 /* Sha256OutputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Sha256OutputStream.m; sourceTree = ""; }; - 4C669B5316760ED100DD0774 /* DDXMLElement+MKPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DDXMLElement+MKPAdditions.h"; sourceTree = ""; }; - 4C669B5416760ED100DD0774 /* DDXMLElement+MKPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "DDXMLElement+MKPAdditions.m"; sourceTree = ""; }; - 4C669B5516760ED100DD0774 /* Kdb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb.h; sourceTree = ""; }; - 4C669B5616760ED100DD0774 /* Kdb.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb.m; sourceTree = ""; }; - 4C669B5916760ED100DD0774 /* Kdb3Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb3Node.h; sourceTree = ""; }; - 4C669B5A16760ED100DD0774 /* Kdb3Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb3Node.m; sourceTree = ""; }; - 4C669B5B16760ED100DD0774 /* Kdb3Reader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb3Reader.h; sourceTree = ""; }; - 4C669B5C16760ED100DD0774 /* Kdb3Reader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb3Reader.m; sourceTree = ""; }; - 4C669B5D16760ED100DD0774 /* Kdb3Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb3Utils.h; sourceTree = ""; }; - 4C669B5E16760ED100DD0774 /* Kdb3Utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb3Utils.m; sourceTree = ""; }; - 4C669B5F16760ED100DD0774 /* Kdb3Writer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb3Writer.h; sourceTree = ""; }; - 4C669B6016760ED100DD0774 /* Kdb3Writer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb3Writer.m; sourceTree = ""; }; - 4C669B6116760ED100DD0774 /* Kdb4Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb4Node.h; sourceTree = ""; }; - 4C669B6216760ED100DD0774 /* Kdb4Node.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb4Node.m; sourceTree = ""; }; - 4C669B6316760ED100DD0774 /* Kdb4Parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb4Parser.h; sourceTree = ""; }; - 4C669B6416760ED100DD0774 /* Kdb4Parser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb4Parser.m; sourceTree = ""; }; - 4C669B6516760ED100DD0774 /* Kdb4Persist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb4Persist.h; sourceTree = ""; }; - 4C669B6616760ED100DD0774 /* Kdb4Persist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb4Persist.m; sourceTree = ""; }; - 4C669B6716760ED100DD0774 /* Kdb4Reader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb4Reader.h; sourceTree = ""; }; - 4C669B6816760ED100DD0774 /* Kdb4Reader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb4Reader.m; sourceTree = ""; }; - 4C669B6916760ED100DD0774 /* Kdb4Writer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kdb4Writer.h; sourceTree = ""; }; - 4C669B6A16760ED100DD0774 /* Kdb4Writer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kdb4Writer.m; sourceTree = ""; }; - 4C669B6B16760ED100DD0774 /* KdbLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KdbLib.h; sourceTree = ""; }; - 4C669B6C16760ED100DD0774 /* KdbPassword.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KdbPassword.h; sourceTree = ""; }; - 4C669B6D16760ED100DD0774 /* KdbPassword.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KdbPassword.m; sourceTree = ""; }; - 4C669B6E16760ED100DD0774 /* KdbReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KdbReader.h; sourceTree = ""; }; - 4C669B6F16760ED100DD0774 /* KdbReaderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KdbReaderFactory.h; sourceTree = ""; }; - 4C669B7016760ED100DD0774 /* KdbReaderFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KdbReaderFactory.m; sourceTree = ""; }; - 4C669B7116760ED100DD0774 /* KdbWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KdbWriter.h; sourceTree = ""; }; - 4C669B7216760ED100DD0774 /* KdbWriterFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KdbWriterFactory.h; sourceTree = ""; }; - 4C669B7316760ED100DD0774 /* KdbWriterFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KdbWriterFactory.m; sourceTree = ""; }; - 4C669B7416760ED100DD0774 /* RandomStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomStream.h; sourceTree = ""; }; - 4C669B7516760ED100DD0774 /* RandomStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RandomStream.m; sourceTree = ""; }; - 4C669B7616760ED100DD0774 /* Salsa20RandomStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Salsa20RandomStream.h; sourceTree = ""; }; - 4C669B7716760ED100DD0774 /* Salsa20RandomStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Salsa20RandomStream.m; sourceTree = ""; }; - 4C669B7A16760ED100DD0774 /* UUID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UUID.h; sourceTree = ""; }; - 4C669B7B16760ED100DD0774 /* UUID.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UUID.m; sourceTree = ""; }; 4C67D32E17981A2B00A7BDFC /* HNHTokenField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHTokenField.h; sourceTree = ""; }; 4C67D32F17981A2B00A7BDFC /* HNHTokenField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHTokenField.m; sourceTree = ""; }; 4C67D33117981ABA00A7BDFC /* HNHTokenFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHTokenFieldCell.h; sourceTree = ""; }; @@ -708,18 +583,12 @@ 4C7ABA4D17BAEC7000FF5799 /* addEntryTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = addEntryTemplate.pdf; path = Icons/addEntryTemplate.pdf; sourceTree = ""; }; 4C7F35691779DFFB00C57890 /* en */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Errors.strings; sourceTree = ""; }; 4C7F356B1779DFFF00C57890 /* de */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Errors.strings; sourceTree = ""; }; - 4C801AFA179310E2002821E3 /* NSString+Hexdata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Hexdata.h"; sourceTree = ""; }; - 4C801AFB179310E2002821E3 /* NSString+Hexdata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Hexdata.m"; sourceTree = ""; }; 4C80BB6D176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHScrollDocumentViewAdapter.h; sourceTree = ""; }; 4C80BB6E176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHScrollDocumentViewAdapter.m; sourceTree = ""; }; 4C811C8116ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPKeyfilePathControlDelegate.h; sourceTree = ""; }; 4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPKeyfilePathControlDelegate.m; sourceTree = ""; }; 4C83814015BF4677001AE468 /* MPDocumentWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDocumentWindowController.h; sourceTree = ""; }; 4C83814115BF4677001AE468 /* MPDocumentWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDocumentWindowController.m; sourceTree = ""; }; - 4C83F4A81774B155006C5FC0 /* Kdb3Tree+NewTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Kdb3Tree+NewTree.h"; sourceTree = ""; }; - 4C83F4A91774B155006C5FC0 /* Kdb3Tree+NewTree.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Kdb3Tree+NewTree.m"; sourceTree = ""; }; - 4C83F4AB1774B25F006C5FC0 /* Kdb4Tree+NewTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Kdb4Tree+NewTree.h"; sourceTree = ""; }; - 4C83F4AC1774B25F006C5FC0 /* Kdb4Tree+NewTree.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Kdb4Tree+NewTree.m"; sourceTree = ""; }; 4C888C8F16EB6C91003D34A1 /* en */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 4C888C9116EB6F5E003D34A1 /* MPToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPToolbarItem.h; sourceTree = ""; }; 4C888C9216EB6F5E003D34A1 /* MPToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPToolbarItem.m; sourceTree = ""; }; @@ -778,18 +647,16 @@ 4CC0D2CD17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCustomFieldTableViewDelegate.m; sourceTree = ""; }; 4CC0D2CF17974A5A000B4BDA /* MPAttachmentTableViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAttachmentTableViewDelegate.h; sourceTree = ""; }; 4CC0D2D017974A5A000B4BDA /* MPAttachmentTableViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAttachmentTableViewDelegate.m; sourceTree = ""; }; - 4CC1AEBC16D4467C006D2AAB /* KdbTree+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbTree+MPAdditions.h"; sourceTree = ""; }; - 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbTree+MPAdditions.m"; sourceTree = ""; }; 4CC299FD176F99E50050C939 /* MPRequestHandlerService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRequestHandlerService.h; sourceTree = ""; }; 4CC299FE176F99E50050C939 /* MPRequestHandlerService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRequestHandlerService.m; sourceTree = ""; }; 4CC29A00176F9D140050C939 /* MPTestAssociateRequestHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTestAssociateRequestHandler.h; sourceTree = ""; }; 4CC29A01176F9D140050C939 /* MPTestAssociateRequestHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTestAssociateRequestHandler.m; sourceTree = ""; }; 4CC3AAB8175F4983003EF01B /* HNHRoundedTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHRoundedTextFieldCell.h; sourceTree = ""; }; 4CC3AAB9175F4983003EF01B /* HNHRoundedTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHRoundedTextFieldCell.m; sourceTree = ""; }; - 4CC672771781D0C0006DEDCF /* KdbGroup+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbGroup+MPAdditions.h"; sourceTree = ""; }; - 4CC672781781D0C0006DEDCF /* KdbGroup+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbGroup+MPAdditions.m"; sourceTree = ""; }; - 4CC6727A1781D0D2006DEDCF /* KdbEntry+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KdbEntry+MPAdditions.h"; sourceTree = ""; }; - 4CC6727B1781D0D2006DEDCF /* KdbEntry+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KdbEntry+MPAdditions.m"; sourceTree = ""; }; + 4CC6DB7817D23719002C6091 /* KPKNode+IconImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KPKNode+IconImage.h"; sourceTree = ""; }; + 4CC6DB7917D23719002C6091 /* KPKNode+IconImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KPKNode+IconImage.m"; sourceTree = ""; }; + 4CC6DB7B17D23DCE002C6091 /* KPKUTIs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKUTIs.h; sourceTree = ""; }; + 4CC6DB7C17D23DCE002C6091 /* KPKUTIs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKUTIs.m; sourceTree = ""; }; 4CC7EA1917807E7E0089D4F3 /* HNHRoundedTextFieldCellHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HNHRoundedTextFieldCellHelper.h; sourceTree = ""; }; 4CC7EA1A17807E7E0089D4F3 /* HNHRoundedTextFieldCellHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHRoundedTextFieldCellHelper.m; sourceTree = ""; }; 4CCA7EEC1797866F00B0B55E /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/GeneralSettings.strings; sourceTree = ""; }; @@ -851,11 +718,7 @@ 4CEAF85A17BA9B44001307A6 /* KPKTestKeyfileParsing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTestKeyfileParsing.m; sourceTree = ""; }; 4CECB31517AC326D00EAFB0F /* KPKTestLegacyWriting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTestLegacyWriting.h; sourceTree = ""; }; 4CECB31617AC326D00EAFB0F /* KPKTestLegacyWriting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTestLegacyWriting.m; sourceTree = ""; }; - 4CF1F0C81786B37900CD920E /* NSData+Gzip.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Gzip.m"; sourceTree = ""; }; - 4CF1F0C91786B37900CD920E /* NSData+Gzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Gzip.h"; sourceTree = ""; }; 4CF29BF317879D0000851B60 /* 26_FileSaveTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 26_FileSaveTemplate.pdf; sourceTree = ""; }; - 4CF4FEDE17AEA4A400712774 /* UUID+Pasterboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UUID+Pasterboard.h"; sourceTree = ""; }; - 4CF4FEDF17AEA4A400712774 /* UUID+Pasterboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UUID+Pasterboard.m"; sourceTree = ""; }; 4CF62B84179385D700B660B6 /* KPKAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKAttribute.h; sourceTree = ""; }; 4CF62B85179385D700B660B6 /* KPKAttribute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKAttribute.m; sourceTree = ""; }; 4CF6C70F176F4533007A811D /* MPStringLengthValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStringLengthValueTransformer.h; sourceTree = ""; }; @@ -872,8 +735,6 @@ 4CF7805E176E75110032EE71 /* ServerSettings.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ServerSettings.xib; sourceTree = ""; }; 4CF78062176E75AD0032EE71 /* MPServerSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPServerSettingsController.h; sourceTree = ""; }; 4CF78063176E75AD0032EE71 /* MPServerSettingsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPServerSettingsController.m; sourceTree = ""; }; - 4CFB5E9D17AAD20200D9B10C /* Kdb4Group+Undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Kdb4Group+Undo.h"; sourceTree = ""; }; - 4CFB5E9E17AAD20200D9B10C /* Kdb4Group+Undo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Kdb4Group+Undo.m"; sourceTree = ""; }; 4CFC53BD16E94729007396BE /* MPShadowBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPShadowBox.h; sourceTree = ""; }; 4CFC53BE16E94729007396BE /* MPShadowBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPShadowBox.m; sourceTree = ""; }; 4CFC8739179DEDF3000DFC03 /* KPKMetaData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKMetaData.h; sourceTree = ""; }; @@ -881,11 +742,8 @@ 4CFC873C179DF200000DFC03 /* KPKTimeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTimeInfo.h; sourceTree = ""; }; 4CFC873D179DF200000DFC03 /* KPKTimeInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTimeInfo.m; sourceTree = ""; }; 4CFC873F179DF295000DFC03 /* KPKTimerecording.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKTimerecording.h; sourceTree = ""; }; - 4CFC8740179DF7A3000DFC03 /* KPKUndoing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KPKUndoing.h; sourceTree = ""; }; 4CFC8741179DFD3E000DFC03 /* KPKTestXmlLoading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KPKTestXmlLoading.h; sourceTree = ""; }; 4CFC8742179DFD3E000DFC03 /* KPKTestXmlLoading.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KPKTestXmlLoading.m; sourceTree = ""; }; - 4CFEB36C1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Kdb3Entry+KVOAdditions.h"; sourceTree = ""; }; - 4CFEB36D1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Kdb3Entry+KVOAdditions.m"; sourceTree = ""; }; 6E719715172058BA00E4C5FC /* MPDatabaseVersion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPDatabaseVersion.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -921,6 +779,8 @@ 4C0104BC17C37C2B00173EF3 /* KPKXmlUtilities.h */, 4C0104BD17C37DA400173EF3 /* KPKXmlUtilities.m */, 4C0104BF17C37DFC00173EF3 /* KPKTypes.h */, + 4CC6DB7B17D23DCE002C6091 /* KPKUTIs.h */, + 4CC6DB7C17D23DCE002C6091 /* KPKUTIs.m */, ); path = Utilites; sourceTree = ""; @@ -967,6 +827,8 @@ 4C46B88417063A070046109A /* NSString+MPPasswordCreation.m */, 4C10412A178CDD44001B5239 /* NSDate+Humanized.h */, 4C10412B178CDD44001B5239 /* NSDate+Humanized.m */, + 4CC6DB7817D23719002C6091 /* KPKNode+IconImage.h */, + 4CC6DB7917D23719002C6091 /* KPKNode+IconImage.m */, ); name = Categories; sourceTree = ""; @@ -1150,70 +1012,6 @@ name = KeepassHttp; sourceTree = ""; }; - 4C2724CB1778EF8E00FD8456 /* Categories */ = { - isa = PBXGroup; - children = ( - 4C669B5316760ED100DD0774 /* DDXMLElement+MKPAdditions.h */, - 4C669B5416760ED100DD0774 /* DDXMLElement+MKPAdditions.m */, - 4C2724CC1778EFB100FD8456 /* NSData+Random.h */, - 4C2724CD1778EFB100FD8456 /* NSData+Random.m */, - 4C2724CF1778EFE300FD8456 /* NSString+Empty.h */, - 4C2724D01778EFE300FD8456 /* NSString+Empty.m */, - 4C2724D21778FA0700FD8456 /* NSDate+Packed.h */, - 4C2724D31778FA0700FD8456 /* NSDate+Packed.m */, - 4CF1F0C81786B37900CD920E /* NSData+Gzip.m */, - 4CF1F0C91786B37900CD920E /* NSData+Gzip.h */, - 4C2724D817790E7C00FD8456 /* NSMutableData+Base64.h */, - 4C2724D917790E7C00FD8456 /* NSMutableData+Base64.m */, - 4C801AFA179310E2002821E3 /* NSString+Hexdata.h */, - 4C801AFB179310E2002821E3 /* NSString+Hexdata.m */, - ); - name = Categories; - sourceTree = ""; - }; - 4C2C4C2516D3BCEA00D49295 /* KeePassLib Categories */ = { - isa = PBXGroup; - children = ( - 4C569DA217653F3500595B62 /* KdbEntry+MPTreeTools.h */, - 4C569DA317653F3500595B62 /* KdbEntry+MPTreeTools.m */, - 4C2C4C2A16D3BE3700D49295 /* KdbGroup+MPTreeTools.h */, - 4C2C4C2B16D3BE3700D49295 /* KdbGroup+MPTreeTools.m */, - 4CC1AEBC16D4467C006D2AAB /* KdbTree+MPAdditions.h */, - 4CC1AEBD16D4467C006D2AAB /* KdbTree+MPAdditions.m */, - 4CC672771781D0C0006DEDCF /* KdbGroup+MPAdditions.h */, - 4CC672781781D0C0006DEDCF /* KdbGroup+MPAdditions.m */, - 4CC6727A1781D0D2006DEDCF /* KdbEntry+MPAdditions.h */, - 4CC6727B1781D0D2006DEDCF /* KdbEntry+MPAdditions.m */, - 4C01C23D1764D2980016D5D0 /* KdbEntry+Undo.h */, - 4C01C23E1764D2980016D5D0 /* KdbEntry+Undo.m */, - 4C22040B1746ED160054C916 /* KdbGroup+Undo.h */, - 4C22040C1746ED160054C916 /* KdbGroup+Undo.m */, - 4C3E1CBE177DEFB3003BD9BD /* StringField+Undo.h */, - 4C3E1CBF177DEFB3003BD9BD /* StringField+Undo.m */, - 4C4A101017629DA900BBF2CA /* KdbGroup+KVOAdditions.h */, - 4C4A101117629DA900BBF2CA /* KdbGroup+KVOAdditions.m */, - 4C36E5B2177CD4FB00152132 /* Kdb4Tree+KVOAdditions.h */, - 4C36E5B3177CD4FB00152132 /* Kdb4Tree+KVOAdditions.m */, - 4C4FCE16177D03D700BBF7AE /* Kdb4Entry+KVOAdditions.h */, - 4C4FCE17177D03D700BBF7AE /* Kdb4Entry+KVOAdditions.m */, - 4CFEB36C1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.h */, - 4CFEB36D1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.m */, - 4C83F4A81774B155006C5FC0 /* Kdb3Tree+NewTree.h */, - 4C83F4A91774B155006C5FC0 /* Kdb3Tree+NewTree.m */, - 4C83F4AB1774B25F006C5FC0 /* Kdb4Tree+NewTree.h */, - 4C83F4AC1774B25F006C5FC0 /* Kdb4Tree+NewTree.m */, - 4C4510071798C53700219998 /* StringField+Validation.h */, - 4C4510081798C53700219998 /* StringField+Validation.m */, - 4C45100A1798C65C00219998 /* Kdb4Entry+MPAdditions.h */, - 4C45100B1798C65C00219998 /* Kdb4Entry+MPAdditions.m */, - 4CFB5E9D17AAD20200D9B10C /* Kdb4Group+Undo.h */, - 4CFB5E9E17AAD20200D9B10C /* Kdb4Group+Undo.m */, - 4CF4FEDE17AEA4A400712774 /* UUID+Pasterboard.h */, - 4CF4FEDF17AEA4A400712774 /* UUID+Pasterboard.m */, - ); - name = "KeePassLib Categories"; - sourceTree = ""; - }; 4C2E382016D141F700037A9D /* Helper */ = { isa = PBXGroup; children = ( @@ -1286,8 +1084,6 @@ 6E719715172058BA00E4C5FC /* MPDatabaseVersion.h */, 4CE5B548173AFBA700207B39 /* MPDocument.h */, 4CE5B549173AFBA700207B39 /* MPDocument.m */, - 4C5EC300177B700D00DA955B /* MPRootAdapter.h */, - 4C5EC301177B700D00DA955B /* MPRootAdapter.m */, 4C3666401787327E00B249F1 /* MPDocument+Attachments.m */, ); name = Model; @@ -1386,102 +1182,12 @@ path = Icons; sourceTree = ""; }; - 4C669B2D16760ED100DD0774 /* MiniKeePassLib */ = { - isa = PBXGroup; - children = ( - 4C669B2F16760ED100DD0774 /* IOStream */, - 4C669B4C16760ED100DD0774 /* KeePassLib */, - ); - path = MiniKeePassLib; - sourceTree = ""; - }; - 4C669B2F16760ED100DD0774 /* IOStream */ = { - isa = PBXGroup; - children = ( - 4C669B3016760ED100DD0774 /* AesInputStream.h */, - 4C669B3116760ED100DD0774 /* AesInputStream.m */, - 4C669B3216760ED100DD0774 /* AesOutputStream.h */, - 4C669B3316760ED100DD0774 /* AesOutputStream.m */, - 4C669B3416760ED100DD0774 /* Arc4RandomStream.h */, - 4C669B3516760ED100DD0774 /* Arc4RandomStream.m */, - 4C669B3616760ED100DD0774 /* DataInputStream.h */, - 4C669B3716760ED100DD0774 /* DataInputStream.m */, - 4C669B3816760ED100DD0774 /* DataOutputStream.h */, - 4C669B3916760ED100DD0774 /* DataOutputStream.m */, - 4C669B3A16760ED100DD0774 /* FileInputStream.h */, - 4C669B3B16760ED100DD0774 /* FileInputStream.m */, - 4C669B3C16760ED100DD0774 /* FileOutputStream.h */, - 4C669B3D16760ED100DD0774 /* FileOutputStream.m */, - 4C669B3E16760ED100DD0774 /* GZipInputStream.h */, - 4C669B3F16760ED100DD0774 /* GZipInputStream.m */, - 4C669B4016760ED100DD0774 /* GZipOutputStream.h */, - 4C669B4116760ED100DD0774 /* GZipOutputStream.m */, - 4C669B4216760ED100DD0774 /* HashedInputStream.h */, - 4C669B4316760ED100DD0774 /* HashedInputStream.m */, - 4C669B4416760ED100DD0774 /* HashedOutputStream.h */, - 4C669B4516760ED100DD0774 /* HashedOutputStream.m */, - 4C669B4616760ED100DD0774 /* InputStream.h */, - 4C669B4716760ED100DD0774 /* InputStream.m */, - 4C669B4816760ED100DD0774 /* OutputStream.h */, - 4C669B4916760ED100DD0774 /* OutputStream.m */, - 4C669B4A16760ED100DD0774 /* Sha256OutputStream.h */, - 4C669B4B16760ED100DD0774 /* Sha256OutputStream.m */, - ); - path = IOStream; - sourceTree = ""; - }; - 4C669B4C16760ED100DD0774 /* KeePassLib */ = { - isa = PBXGroup; - children = ( - 4C2724CB1778EF8E00FD8456 /* Categories */, - 4C669B5516760ED100DD0774 /* Kdb.h */, - 4C669B5616760ED100DD0774 /* Kdb.m */, - 4C669B5916760ED100DD0774 /* Kdb3Node.h */, - 4C669B5A16760ED100DD0774 /* Kdb3Node.m */, - 4C669B5B16760ED100DD0774 /* Kdb3Reader.h */, - 4C669B5C16760ED100DD0774 /* Kdb3Reader.m */, - 4C669B5D16760ED100DD0774 /* Kdb3Utils.h */, - 4C669B5E16760ED100DD0774 /* Kdb3Utils.m */, - 4C669B5F16760ED100DD0774 /* Kdb3Writer.h */, - 4C669B6016760ED100DD0774 /* Kdb3Writer.m */, - 4C669B6116760ED100DD0774 /* Kdb4Node.h */, - 4C669B6216760ED100DD0774 /* Kdb4Node.m */, - 4C669B6316760ED100DD0774 /* Kdb4Parser.h */, - 4C669B6416760ED100DD0774 /* Kdb4Parser.m */, - 4C669B6516760ED100DD0774 /* Kdb4Persist.h */, - 4C669B6616760ED100DD0774 /* Kdb4Persist.m */, - 4C669B6716760ED100DD0774 /* Kdb4Reader.h */, - 4C669B6816760ED100DD0774 /* Kdb4Reader.m */, - 4C669B6916760ED100DD0774 /* Kdb4Writer.h */, - 4C669B6A16760ED100DD0774 /* Kdb4Writer.m */, - 4C669B6B16760ED100DD0774 /* KdbLib.h */, - 4C669B6C16760ED100DD0774 /* KdbPassword.h */, - 4C669B6D16760ED100DD0774 /* KdbPassword.m */, - 4C669B6E16760ED100DD0774 /* KdbReader.h */, - 4C669B6F16760ED100DD0774 /* KdbReaderFactory.h */, - 4C669B7016760ED100DD0774 /* KdbReaderFactory.m */, - 4C669B7116760ED100DD0774 /* KdbWriter.h */, - 4C669B7216760ED100DD0774 /* KdbWriterFactory.h */, - 4C669B7316760ED100DD0774 /* KdbWriterFactory.m */, - 4C669B7416760ED100DD0774 /* RandomStream.h */, - 4C669B7516760ED100DD0774 /* RandomStream.m */, - 4C669B7616760ED100DD0774 /* Salsa20RandomStream.h */, - 4C669B7716760ED100DD0774 /* Salsa20RandomStream.m */, - 4C669B7A16760ED100DD0774 /* UUID.h */, - 4C669B7B16760ED100DD0774 /* UUID.m */, - 4C2A6132177A181300C9826C /* KPLErrorCodes.h */, - 4C2A6133177A1D5F00C9826C /* KPLErrorCodes.m */, - ); - path = KeePassLib; - sourceTree = ""; - }; 4C77E35715B84A240093A587 = { isa = PBXGroup; children = ( 4C245A64176E1E3C0086100E /* CocoaHTTPServer */, 4CC3AAB6175F4983003EF01B /* HNHUi */, 4CD3ABAD178F71B50073F5C5 /* KeePassKit */, - 4C669B2D16760ED100DD0774 /* MiniKeePassLib */, 4CAD745415B887FD00104512 /* KissXML */, 4C77E36C15B84A240093A587 /* MacPass */, 4C45FB1E178E09ED0010007D /* MacPassTests */, @@ -1530,7 +1236,6 @@ 4C217D8E17A32BCF00609FAA /* Common */, 4C104129178CDD26001B5239 /* Categories */, 4C245C11176E22150086100E /* KeepassHttp */, - 4C2C4C2516D3BCEA00D49295 /* KeePassLib Categories */, 4C2E382016D141F700037A9D /* Helper */, 4CE88B9317BA64DB0042E078 /* Icons */, 4C586F9C16D07ABD00E7DB57 /* Database Icons */, @@ -1709,6 +1414,18 @@ 4CD3ABAF178F71B50073F5C5 /* Categories */ = { isa = PBXGroup; children = ( + 4C5CD34917D15DBD000B7F38 /* NSData+Gzip.h */, + 4C5CD34A17D15DBD000B7F38 /* NSData+Gzip.m */, + 4C5CD34B17D15DBD000B7F38 /* NSData+Random.h */, + 4C5CD34C17D15DBD000B7F38 /* NSData+Random.m */, + 4C5CD34D17D15DBD000B7F38 /* NSDate+Packed.h */, + 4C5CD34E17D15DBD000B7F38 /* NSDate+Packed.m */, + 4C5CD34F17D15DBD000B7F38 /* NSMutableData+Base64.h */, + 4C5CD35017D15DBD000B7F38 /* NSMutableData+Base64.m */, + 4C5CD35117D15DBD000B7F38 /* NSString+Empty.h */, + 4C5CD35217D15DBD000B7F38 /* NSString+Empty.m */, + 4C5CD35317D15DBD000B7F38 /* NSString+Hexdata.h */, + 4C5CD35417D15DBD000B7F38 /* NSString+Hexdata.m */, 4C1842BE179B5BFD00E2F5BC /* NSData+CommonCrypto.h */, 4C1842BF179B5BFD00E2F5BC /* NSData+CommonCrypto.m */, 4C2724D51778FF1A00FD8456 /* NSUUID+KeePassKit.h */, @@ -1757,7 +1474,6 @@ 4CFC873C179DF200000DFC03 /* KPKTimeInfo.h */, 4CFC873D179DF200000DFC03 /* KPKTimeInfo.m */, 4CFC873F179DF295000DFC03 /* KPKTimerecording.h */, - 4CFC8740179DF7A3000DFC03 /* KPKUndoing.h */, 4C68456817BC21DD00FCDBFC /* KPKAutotype.h */, 4C68456917BC21DD00FCDBFC /* KPKAutotype.m */, 4C68456B17BC227B00FCDBFC /* KPKWindowAssociation.h */, @@ -1769,6 +1485,12 @@ 4CD3ABB5178F71B50073F5C5 /* IO */ = { isa = PBXGroup; children = ( + 4C5CD35B17D15DCA000B7F38 /* KPKArc4RandomStream.h */, + 4C5CD35C17D15DCA000B7F38 /* KPKArc4RandomStream.m */, + 4C5CD35D17D15DCA000B7F38 /* KPKRandomStream.h */, + 4C5CD35E17D15DCA000B7F38 /* KPKRandomStream.m */, + 4C5CD35F17D15DCA000B7F38 /* KPKSalsa20RandomStream.h */, + 4C5CD36017D15DCA000B7F38 /* KPKSalsa20RandomStream.m */, 4CDB5C401794AA4F0017667E /* KPKTree+Serializing.h */, 4CDB5C411794AA4F0017667E /* KPKTree+Serializing.m */, 4C1842BA179B434C00E2F5BC /* KPKXmlHeaderReader.h */, @@ -2112,45 +1834,12 @@ 4CA0B2F915BCAF6700654E32 /* MPGeneralSettingsController.m in Sources */, 4CA0B2FC15BCAF8600654E32 /* MPSettingsWindowController.m in Sources */, 4C83814215BF4677001AE468 /* MPDocumentWindowController.m in Sources */, - 4C669B7F16760ED100DD0774 /* AesInputStream.m in Sources */, - 4C669B8016760ED100DD0774 /* AesOutputStream.m in Sources */, - 4C669B8116760ED100DD0774 /* Arc4RandomStream.m in Sources */, - 4C669B8216760ED100DD0774 /* DataInputStream.m in Sources */, - 4C669B8316760ED100DD0774 /* DataOutputStream.m in Sources */, - 4C669B8416760ED100DD0774 /* FileInputStream.m in Sources */, - 4C669B8516760ED100DD0774 /* FileOutputStream.m in Sources */, - 4C669B8616760ED100DD0774 /* GZipInputStream.m in Sources */, - 4C669B8716760ED100DD0774 /* GZipOutputStream.m in Sources */, - 4C669B8816760ED100DD0774 /* HashedInputStream.m in Sources */, - 4C669B8916760ED100DD0774 /* HashedOutputStream.m in Sources */, - 4C669B8A16760ED100DD0774 /* InputStream.m in Sources */, - 4C669B8B16760ED100DD0774 /* OutputStream.m in Sources */, - 4C669B8C16760ED100DD0774 /* Sha256OutputStream.m in Sources */, - 4C669B9016760ED100DD0774 /* DDXMLElement+MKPAdditions.m in Sources */, - 4C669B9116760ED100DD0774 /* Kdb.m in Sources */, - 4C669B9316760ED100DD0774 /* Kdb3Node.m in Sources */, - 4C669B9416760ED100DD0774 /* Kdb3Reader.m in Sources */, - 4C669B9516760ED100DD0774 /* Kdb3Utils.m in Sources */, - 4C669B9616760ED100DD0774 /* Kdb3Writer.m in Sources */, - 4C669B9716760ED100DD0774 /* Kdb4Node.m in Sources */, - 4C669B9816760ED100DD0774 /* Kdb4Parser.m in Sources */, - 4C669B9916760ED100DD0774 /* Kdb4Persist.m in Sources */, - 4C669B9A16760ED100DD0774 /* Kdb4Reader.m in Sources */, - 4C669B9B16760ED100DD0774 /* Kdb4Writer.m in Sources */, - 4C669B9C16760ED100DD0774 /* KdbPassword.m in Sources */, - 4C669B9D16760ED100DD0774 /* KdbReaderFactory.m in Sources */, - 4C669B9E16760ED100DD0774 /* KdbWriterFactory.m in Sources */, - 4C669B9F16760ED100DD0774 /* RandomStream.m in Sources */, - 4C669BA016760ED100DD0774 /* Salsa20RandomStream.m in Sources */, - 4C669BA216760ED100DD0774 /* UUID.m in Sources */, 4C2E382316D1421B00037A9D /* MPIconHelper.m in Sources */, 4C2E382616D1470200037A9D /* MPViewController.m in Sources */, 4C65FAE916D16DDB006E0577 /* MPPasswordInputController.m in Sources */, 4CDF01A316D1B76700D0AC08 /* MPEntryViewController.m in Sources */, 4C3BD51516D276F800389F1F /* MPToolbarDelegate.m in Sources */, 4C61EA0316D2FD0800AC519E /* MPOutlineViewController.m in Sources */, - 4C2C4C2C16D3BE3700D49295 /* KdbGroup+MPTreeTools.m in Sources */, - 4CC1AEBE16D4467C006D2AAB /* KdbTree+MPAdditions.m in Sources */, 4C69A73A16D589DF00EC1B1A /* HNHGradientView.m in Sources */, 4C65C79C16DD283900E32CFF /* MPToolbarButton.m in Sources */, 4C431BCD16E2A82800700A81 /* MPPasteBoardController.m in Sources */, @@ -2166,21 +1855,17 @@ 4C46B88517063A070046109A /* NSString+MPPasswordCreation.m in Sources */, 4C5A11FE1708DE8700223D8A /* MPPasswordCreatorViewController.m in Sources */, 4CE5B54B173AFBA700207B39 /* MPDocument.m in Sources */, - 4C22040D1746ED160054C916 /* KdbGroup+Undo.m in Sources */, 4C3D4C0817594CA40038DAAC /* HNHSeparator.m in Sources */, 4C5BF67B175C01F300D53DF7 /* MPUppercaseStringValueTransformer.m in Sources */, 4CC3AABD175F4983003EF01B /* HNHRoundedTextFieldCell.m in Sources */, 4C9D6AA917615199001C660C /* HNHRoundedSecureTextFieldCell.m in Sources */, 4C4A100F176286FD00BBF2CA /* MPTableView.m in Sources */, - 4C4A101217629DA900BBF2CA /* KdbGroup+KVOAdditions.m in Sources */, 4CAF62FC1763604000CD7084 /* HNHBadgedTextFieldCell.m in Sources */, 4C58BD4F176370B100B8178C /* HNHBadgedTextField.m in Sources */, - 4C01C23F1764D2980016D5D0 /* KdbEntry+Undo.m in Sources */, 4C01C2421764D8980016D5D0 /* MPContextMenuHelper.m in Sources */, 4C01C245176500C40016D5D0 /* HNHLevelIndicatorCell.m in Sources */, 4C569D9E17652B0600595B62 /* MPConstants.m in Sources */, 4C569DA117652BFE00595B62 /* MPEntryTableDataSource.m in Sources */, - 4C569DA417653F3500595B62 /* KdbEntry+MPTreeTools.m in Sources */, 4C79DF2A176685870083708F /* HNHRoundedTextField.m in Sources */, 4C46E09E17673A0A00DA62E8 /* HNHShadowBox.m in Sources */, 4C37A6731769393300AD0A40 /* HNHTableHeaderCell.m in Sources */, @@ -2220,27 +1905,13 @@ 4CC299FF176F99E50050C939 /* MPRequestHandlerService.m in Sources */, 4CC29A02176F9D140050C939 /* MPTestAssociateRequestHandler.m in Sources */, 4CA0E3A7176FAF99004D18CB /* MPDocumentQueryService.m in Sources */, - 4C83F4AA1774B155006C5FC0 /* Kdb3Tree+NewTree.m in Sources */, - 4C83F4AD1774B25F006C5FC0 /* Kdb4Tree+NewTree.m in Sources */, - 4C2724CE1778EFB100FD8456 /* NSData+Random.m in Sources */, - 4C2724D11778EFE300FD8456 /* NSString+Empty.m in Sources */, - 4C2724D41778FA0700FD8456 /* NSDate+Packed.m in Sources */, 4C2724D71778FF1A00FD8456 /* NSUUID+KeePassKit.m in Sources */, - 4C2724DA17790E7C00FD8456 /* NSMutableData+Base64.m in Sources */, - 4C2A6134177A1D5F00C9826C /* KPLErrorCodes.m in Sources */, 4CD5D705177A5F3300100649 /* MPDatabaseSettingsWindowController.m in Sources */, - 4C5EC302177B700D00DA955B /* MPRootAdapter.m in Sources */, 4C74DD07177BD1640034A9DB /* MPCustomFieldView.m in Sources */, - 4C36E5B4177CD4FB00152132 /* Kdb4Tree+KVOAdditions.m in Sources */, 4C4FCE15177CFE6B00BBF7AE /* MPCustomFieldTableCellView.m in Sources */, - 4C4FCE18177D03D700BBF7AE /* Kdb4Entry+KVOAdditions.m in Sources */, 4C52A244177D7B9F0000D88F /* HNHScrollView.m in Sources */, - 4C3E1CC0177DEFB3003BD9BD /* StringField+Undo.m in Sources */, 4CC7EA1B17807E7E0089D4F3 /* HNHRoundedTextFieldCellHelper.m in Sources */, - 4CC672791781D0C0006DEDCF /* KdbGroup+MPAdditions.m in Sources */, - 4CC6727C1781D0D2006DEDCF /* KdbEntry+MPAdditions.m in Sources */, 4C5FE9AE17843CE20001D5A8 /* MPSelectedAttachmentTableCellView.m in Sources */, - 4CF1F0CA1786B37900CD920E /* NSData+Gzip.m in Sources */, 4C3666411787327E00B249F1 /* MPDocument+Attachments.m in Sources */, 4CD6C5AE1789FDE6000891F6 /* HNHRoundedSecureTextField.m in Sources */, 4C10412C178CDD44001B5239 /* NSDate+Humanized.m in Sources */, @@ -2253,7 +1924,6 @@ 4C8A173D1790AA41008B5C17 /* NSData+Keyfile.m in Sources */, 4C3F28541791EDFD00703281 /* KPKErrors.m in Sources */, 4C4436771792BE810099E220 /* KPKFormat.m in Sources */, - 4C801AFC179310E2002821E3 /* NSString+Hexdata.m in Sources */, 4CF62B86179385D700B660B6 /* KPKAttribute.m in Sources */, 4CDB5C421794AA4F0017667E /* KPKTree+Serializing.m in Sources */, 4C5AA591179549A1008ECAD7 /* KPKXmlTreeWriter.m in Sources */, @@ -2263,9 +1933,6 @@ 4CC0D2D117974A5A000B4BDA /* MPAttachmentTableViewDelegate.m in Sources */, 4C67D33017981A2B00A7BDFC /* HNHTokenField.m in Sources */, 4C67D33317981ABA00A7BDFC /* HNHTokenFieldCell.m in Sources */, - 4C4510091798C53700219998 /* StringField+Validation.m in Sources */, - 4C45100C1798C65C00219998 /* Kdb4Entry+MPAdditions.m in Sources */, - 4CFEB36E1799D9CF00AF1868 /* Kdb3Entry+KVOAdditions.m in Sources */, 4C305F36179A0BD70082334F /* KPKIcon.m in Sources */, 4C1842AB179B027800E2F5BC /* KPKDeletedNode.m in Sources */, 4C1842AF179B211C00E2F5BC /* KPKXmlTreeReader.m in Sources */, @@ -2295,9 +1962,7 @@ 4CA08DA017A831B200A6544B /* MPAddEntryContextMenuDelegate.m in Sources */, 4C6BEA3117A88E6C00CF69A8 /* MPStripLineBreaksTransformer.m in Sources */, 4C79E80317A9187400AC6CD2 /* KPKXmlHeaderWriter.m in Sources */, - 4CFB5E9F17AAD20200D9B10C /* Kdb4Group+Undo.m in Sources */, 4CE3E62617AB0D2D00D9E4B4 /* MPAttachmentTableDataSource.m in Sources */, - 4CF4FEE017AEA4A400712774 /* UUID+Pasterboard.m in Sources */, 4C6366AC17AF1E0100AAF17D /* NSColor+KeePassKit.m in Sources */, 4C08C3AE17B3022400BBBC95 /* KPKLegacyHeaderWriter.m in Sources */, 4C0728BD17B5B7F7005A7DD9 /* MPPasswordEditWindowController.m in Sources */, @@ -2311,6 +1976,17 @@ 4C6C72C417C01E4200768849 /* NSMutableData+KeePassKit.m in Sources */, 4C0104BB17C37BFC00173EF3 /* KPKLegacyHeaderUtility.m in Sources */, 4C0104BE17C37DA400173EF3 /* KPKXmlUtilities.m in Sources */, + 4C5CD35517D15DBD000B7F38 /* NSData+Gzip.m in Sources */, + 4C5CD35617D15DBD000B7F38 /* NSData+Random.m in Sources */, + 4C5CD35717D15DBD000B7F38 /* NSDate+Packed.m in Sources */, + 4C5CD35817D15DBD000B7F38 /* NSMutableData+Base64.m in Sources */, + 4C5CD35917D15DBD000B7F38 /* NSString+Empty.m in Sources */, + 4C5CD35A17D15DBD000B7F38 /* NSString+Hexdata.m in Sources */, + 4C5CD36117D15DCA000B7F38 /* KPKArc4RandomStream.m in Sources */, + 4C5CD36217D15DCA000B7F38 /* KPKRandomStream.m in Sources */, + 4C5CD36317D15DCA000B7F38 /* KPKSalsa20RandomStream.m in Sources */, + 4CC6DB7A17D23719002C6091 /* KPKNode+IconImage.m in Sources */, + 4CC6DB7D17D23DCE002C6091 /* KPKUTIs.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MacPass/KPKNode+IconImage.h b/MacPass/KPKNode+IconImage.h new file mode 100644 index 00000000..c14007a4 --- /dev/null +++ b/MacPass/KPKNode+IconImage.h @@ -0,0 +1,15 @@ +// +// KPKNode+IconImage.h +// MacPass +// +// Created by Michael Starke on 31.08.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "KPKNode.h" + +@interface KPKNode (IconImage) + +@property (nonatomic, readonly) NSImage *iconImage; + +@end diff --git a/MacPass/KPKNode+IconImage.m b/MacPass/KPKNode+IconImage.m new file mode 100644 index 00000000..136946bc --- /dev/null +++ b/MacPass/KPKNode+IconImage.m @@ -0,0 +1,26 @@ +// +// KPKNode+IconImage.m +// MacPass +// +// Created by Michael Starke on 31.08.13. +// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. +// + +#import "KPKNode+IconImage.h" + +#import "KPKIcon.h" + +#import "MPIconHelper.h" + +@implementation KPKNode (IconImage) + +- (NSImage *)iconImage { + if([self respondsToSelector:@selector(customIconUuid)]) { + // find the custom icon + } + if(self.customIcon) { + return self.customIcon.image; + } + return [MPIconHelper icon:(MPIconType)self.icon]; +} +@end diff --git a/MacPass/Kdb3Entry+KVOAdditions.h b/MacPass/Kdb3Entry+KVOAdditions.h deleted file mode 100644 index 5f52295a..00000000 --- a/MacPass/Kdb3Entry+KVOAdditions.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// Kdb3Entry+KVOAdditions.h -// MacPass -// -// Created by Michael Starke on 19.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb3Node.h" - -@interface Kdb3Entry (KVOAdditions) - -- (NSUInteger)countOfBinaries; -- (id)objectInBinariesAtIndex:(NSUInteger)index; -- (void)removeObjectFromBinariesAtIndex:(NSUInteger)index; -- (void)insertObject:(id)binary inBinariesAtIndex:(NSUInteger)index; - -@end diff --git a/MacPass/Kdb3Entry+KVOAdditions.m b/MacPass/Kdb3Entry+KVOAdditions.m deleted file mode 100644 index 1a889586..00000000 --- a/MacPass/Kdb3Entry+KVOAdditions.m +++ /dev/null @@ -1,31 +0,0 @@ -// -// Kdb3Entry+KVOAdditions.m -// MacPass -// -// Created by Michael Starke on 19.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb3Entry+KVOAdditions.h" - -@implementation Kdb3Entry (KVOAdditions) - -- (NSUInteger)countOfBinaries { - return (self.binary != nil ? 1 : 0); -} -- (id)objectInBinariesAtIndex:(NSUInteger)index { - return self.binary; -} -- (void)removeObjectFromBinariesAtIndex:(NSUInteger)index { - if(self.binary ) { - self.binary = nil; - self.binaryDesc = nil; - } -} -- (void)insertObject:(id)binary inBinariesAtIndex:(NSUInteger)index { - return;// -} - - - -@end diff --git a/MacPass/Kdb3Tree+NewTree.h b/MacPass/Kdb3Tree+NewTree.h deleted file mode 100644 index 759cfffd..00000000 --- a/MacPass/Kdb3Tree+NewTree.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Kdb3Tree+NewTree.h -// MacPass -// -// Created by Michael Starke on 21.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb3Node.h" - -@interface Kdb3Tree (NewTree) - -+ (Kdb3Tree *)templateTree; - -@end diff --git a/MacPass/Kdb3Tree+NewTree.m b/MacPass/Kdb3Tree+NewTree.m deleted file mode 100644 index f880401f..00000000 --- a/MacPass/Kdb3Tree+NewTree.m +++ /dev/null @@ -1,54 +0,0 @@ -// -// Kdb3Tree+NewTree.m -// MacPass -// -// Created by Michael Starke on 21.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb3Tree+NewTree.h" - -@implementation Kdb3Tree (NewTree) - -+ (Kdb3Tree *)templateTree { - Kdb3Tree *tree = [[Kdb3Tree alloc] init]; - - Kdb3Group *rootGroup = [[Kdb3Group alloc] init]; - rootGroup.name = @"%ROOT%"; - tree.root = rootGroup; - - KdbGroup *parentGroup = [tree createGroup:rootGroup]; - parentGroup.name = NSLocalizedString(@"GENERAL", "General"); - parentGroup.image = 48; - [rootGroup addGroup:parentGroup]; - - KdbGroup *group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"WINDOWS", "Windows"); - group.image = 38; - [parentGroup addGroup:group]; - - group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"NETWORK", "Network"); - group.image = 3; - [parentGroup addGroup:group]; - - group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"INTERNET", "Internet"); - group.image = 1; - [parentGroup addGroup:group]; - - group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"EMAIL", "EMail"); - group.image = 19; - [parentGroup addGroup:group]; - - group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"HOMEBANKING", "Homebanking"); - group.image = 37; - [parentGroup addGroup:group]; - - - return tree; -} - -@end diff --git a/MacPass/Kdb4Entry+KVOAdditions.h b/MacPass/Kdb4Entry+KVOAdditions.h deleted file mode 100644 index 38e719b3..00000000 --- a/MacPass/Kdb4Entry+KVOAdditions.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Kdb4Entry+KVOAdditions.h -// MacPass -// -// Created by Michael Starke on 28.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Node.h" - -@interface Kdb4Entry (KVOAdditions) - -- (NSUInteger)countOfStringFields; -- (StringField *)objectInStringFieldsAtIndex:(NSUInteger)index; -- (void)removeObjectFromStringFieldsAtIndex:(NSUInteger)anIndex; -- (void)insertObject:(StringField *)stringfield inStringFieldsAtIndex:(NSUInteger)anIndex; - -- (NSUInteger)countOfBinaries; -- (BinaryRef *)objectInBinariesAtIndex:(NSUInteger)index; -- (void)removeObjectFromBinariesAtIndex:(NSUInteger)index; -- (void)insertObject:(BinaryRef *)binary inBinariesAtIndex:(NSUInteger)index; - -@end diff --git a/MacPass/Kdb4Entry+KVOAdditions.m b/MacPass/Kdb4Entry+KVOAdditions.m deleted file mode 100644 index b303ff77..00000000 --- a/MacPass/Kdb4Entry+KVOAdditions.m +++ /dev/null @@ -1,47 +0,0 @@ -// -// Kdb4Entry+KVOAdditions.m -// MacPass -// -// Created by Michael Starke on 28.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Entry+KVOAdditions.h" - -@implementation Kdb4Entry (KVOAdditions) - -/* Entries */ -- (NSUInteger)countOfStringFields { - return [self.stringFields count]; -} - -- (StringField *)objectInStringFieldsAtIndex:(NSUInteger)index { - return (self.stringFields)[index]; -} - -- (void)insertObject:(StringField *)stringfield inStringFieldsAtIndex:(NSUInteger)anIndex { - [self.stringFields insertObject:stringfield atIndex:anIndex]; -} - -- (void)removeObjectFromStringFieldsAtIndex:(NSUInteger)anIndex { - [self.stringFields removeObjectAtIndex:anIndex]; -} - -/* Binaries */ -- (NSUInteger)countOfBinaries { - return [self.binaries count]; -} - -- (BinaryRef *)objectInBinariesAtIndex:(NSUInteger)index { - return (self.binaries)[index]; -} - -- (void)insertObject:(BinaryRef *)binary inBinariesAtIndex:(NSUInteger)index { - [self.binaries insertObject:binary atIndex:index]; -} - -- (void)removeObjectFromBinariesAtIndex:(NSUInteger)index { - [self.binaries removeObjectAtIndex:index]; -} - -@end diff --git a/MacPass/Kdb4Entry+MPAdditions.h b/MacPass/Kdb4Entry+MPAdditions.h deleted file mode 100644 index 05b9c09f..00000000 --- a/MacPass/Kdb4Entry+MPAdditions.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Kdb4Entry+MPAdditions.h -// MacPass -// -// Created by Michael Starke on 19.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Node.h" - -@interface Kdb4Entry (MPAdditions) - -- (NSString *)uniqueKeyForProposal:(NSString *)key; - -@end diff --git a/MacPass/Kdb4Entry+MPAdditions.m b/MacPass/Kdb4Entry+MPAdditions.m deleted file mode 100644 index cfc696ce..00000000 --- a/MacPass/Kdb4Entry+MPAdditions.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// Kdb4Entry+MPAdditions.m -// MacPass -// -// Created by Michael Starke on 19.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Entry+MPAdditions.h" - -@implementation Kdb4Entry (MPAdditions) - -- (NSString *)uniqueKeyForProposal:(NSString *)key { - - if(key == nil) { - key = NSLocalizedString(@"DEFAULT_CUSTOM_FIELD_TITLE", @"Default Titel for new Custom-Fields"); - } - - NSArray *defaultKeys = @[ FIELD_TITLE, - FIELD_USER_NAME, - FIELD_PASSWORD, - FIELD_URL, - FIELD_NOTES ]; - NSMutableSet *keys = [[NSMutableSet alloc] initWithArray:defaultKeys]; - for(StringField *field in self.stringFields) { - [keys addObject:field.key]; - } - NSUInteger counter = 1; - NSString *base = key; - while([keys containsObject:key]) { - key = [NSString stringWithFormat:@"%@-%ld", base, counter++]; - } - return key; -} - -@end diff --git a/MacPass/Kdb4Group+Undo.h b/MacPass/Kdb4Group+Undo.h deleted file mode 100644 index 575dceb9..00000000 --- a/MacPass/Kdb4Group+Undo.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// Kdb4Group+Undo.h -// MacPass -// -// Created by Michael Starke on 01.08.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Node.h" - -@interface Kdb4Group (Undo) - -- (NSString *)notesUndoable; -- (void)setNotesUndoable:(NSString *)newNotes; - -@end diff --git a/MacPass/Kdb4Group+Undo.m b/MacPass/Kdb4Group+Undo.m deleted file mode 100644 index d596376f..00000000 --- a/MacPass/Kdb4Group+Undo.m +++ /dev/null @@ -1,24 +0,0 @@ -// -// Kdb4Group+Undo.m -// MacPass -// -// Created by Michael Starke on 01.08.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Group+Undo.h" -#import "KdbGroup+Undo.h" - -@implementation Kdb4Group (Undo) - -- (NSString *)notesUndoable { - return self.notes; -} - -- (void)setNotesUndoable:(NSString *)newNotes { - [[self undoManager] registerUndoWithTarget:self selector:@selector(setNotesUndoable:) object:self.notes]; - [[self undoManager] setActionName:NSLocalizedString(@"SET_NOTES", "")]; - self.notes = newNotes; -} - -@end diff --git a/MacPass/Kdb4Tree+KVOAdditions.h b/MacPass/Kdb4Tree+KVOAdditions.h deleted file mode 100644 index 400e6980..00000000 --- a/MacPass/Kdb4Tree+KVOAdditions.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Kdb4Tree+KVOAdditions.h -// MacPass -// -// Created by Michael Starke on 27.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Node.h" - -@interface Kdb4Tree (KVOAdditions) - -- (void)insertObject:(Binary *)binary inBinariesAtIndex:(NSUInteger)index; -- (void)insertObject:(CustomIcon *)icon inCustomIconsAtIndex:(NSUInteger)index; - -- (CustomIcon *)objectInCustomIconsAtIndex:(NSUInteger)index; -- (Binary *)objectInBinariesAtIndex:(NSUInteger)index; - -@end diff --git a/MacPass/Kdb4Tree+KVOAdditions.m b/MacPass/Kdb4Tree+KVOAdditions.m deleted file mode 100644 index 405f5489..00000000 --- a/MacPass/Kdb4Tree+KVOAdditions.m +++ /dev/null @@ -1,29 +0,0 @@ -// -// Kdb4Tree+KVOAdditions.m -// MacPass -// -// Created by Michael Starke on 27.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Tree+KVOAdditions.h" - -@implementation Kdb4Tree (KVOAdditions) - -- (void)insertObject:(Binary *)binary inBinariesAtIndex:(NSUInteger)index { - [self.binaries insertObject:binary atIndex:index]; -} - -- (void)insertObject:(CustomIcon *)icon inCustomIconsAtIndex:(NSUInteger)index { - [self.customIcons insertObject:icon atIndex:index]; -} - -- (Binary *)objectInBinariesAtIndex:(NSUInteger)index { - return (self.binaries)[index]; -} - -- (CustomIcon *)objectInCustomIconsAtIndex:(NSUInteger)index { - return (self.customIcons)[index]; -} - -@end diff --git a/MacPass/Kdb4Tree+NewTree.h b/MacPass/Kdb4Tree+NewTree.h deleted file mode 100644 index 520c3533..00000000 --- a/MacPass/Kdb4Tree+NewTree.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// Kdb4Tree+NewTree.h -// MacPass -// -// Created by Michael Starke on 21.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Node.h" - -@interface Kdb4Tree (NewTree) - -+(Kdb4Tree *)templateTree; -+(Kdb4Tree *)demoTree; - -@end diff --git a/MacPass/Kdb4Tree+NewTree.m b/MacPass/Kdb4Tree+NewTree.m deleted file mode 100644 index 3ddfe579..00000000 --- a/MacPass/Kdb4Tree+NewTree.m +++ /dev/null @@ -1,123 +0,0 @@ -// -// Kdb4Tree+NewTree.m -// MacPass -// -// Created by Michael Starke on 21.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Tree+NewTree.h" - -@implementation Kdb4Tree (NewTree) - -+ (Kdb4Tree *)templateTree { - NSDate *currentTime = [NSDate date]; - - Kdb4Tree *tree = [[Kdb4Tree alloc] init]; - tree.generator = @"MacPass"; - tree.databaseName = NSLocalizedString(@"DATABASE", ""); - tree.databaseNameChanged = currentTime; - tree.databaseDescription = @""; - tree.databaseDescriptionChanged = currentTime; - tree.defaultUserName = @""; - tree.defaultUserNameChanged = currentTime; - tree.maintenanceHistoryDays = 365; - tree.color = @""; - tree.masterKeyChanged = currentTime; - tree.masterKeyChangeRec = -1; - tree.masterKeyChangeForce = -1; - tree.protectTitle = NO; - tree.protectUserName = NO; - tree.protectPassword = YES; - tree.protectUrl = NO; - tree.protectNotes = NO; - tree.recycleBinEnabled = YES; - tree.recycleBinUuid = [UUID nullUuid]; - tree.recycleBinChanged = currentTime; - tree.entryTemplatesGroup = [UUID nullUuid]; - tree.entryTemplatesGroupChanged = currentTime; - tree.historyMaxItems = 10; - tree.historyMaxSize = 6 * 1024 * 1024; // 6 MB - tree.lastSelectedGroup = [UUID nullUuid]; - tree.lastTopVisibleGroup = [UUID nullUuid]; - - KdbGroup *parentGroup = [tree createGroup:nil]; - parentGroup.name = NSLocalizedString(@"GENERAL", "General"); - parentGroup.image = 48; - tree.root = parentGroup; - - KdbGroup *group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"WINDOWS", "Windows"); - group.image = 38; - [parentGroup addGroup:group]; - - group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"NETWORK", "Network"); - group.image = 3; - [parentGroup addGroup:group]; - - group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"INTERNET", "Internet"); - group.image = 1; - [parentGroup addGroup:group]; - - group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"EMAIL", "EMail"); - group.image = 19; - [parentGroup addGroup:group]; - - group = [tree createGroup:parentGroup]; - group.name = NSLocalizedString(@"HOMEBANKING", "Homebanking"); - group.image = 37; - [parentGroup addGroup:group]; - - return tree; -} - -+ (Kdb4Tree *)demoTree { - NSDate *currentTime = [NSDate date]; - - Kdb4Tree *tree = [[Kdb4Tree alloc] init]; - tree.generator = @"MacPass"; - tree.databaseName = @"Icon Demonstation"; - tree.databaseNameChanged = currentTime; - tree.databaseDescription = @"This database just has all default icons as groups in the tree"; - tree.databaseDescriptionChanged = currentTime; - tree.defaultUserName = @""; - tree.defaultUserNameChanged = currentTime; - tree.maintenanceHistoryDays = 365; - tree.color = @""; - tree.masterKeyChanged = currentTime; - tree.masterKeyChangeRec = -1; - tree.masterKeyChangeForce = -1; - tree.protectTitle = NO; - tree.protectUserName = NO; - tree.protectPassword = YES; - tree.protectUrl = NO; - tree.protectNotes = NO; - tree.recycleBinEnabled = YES; - tree.recycleBinUuid = [UUID nullUuid]; - tree.recycleBinChanged = currentTime; - tree.entryTemplatesGroup = [UUID nullUuid]; - tree.entryTemplatesGroupChanged = currentTime; - tree.historyMaxItems = 10; - tree.historyMaxSize = 6 * 1024 * 1024; // 6 MB - tree.lastSelectedGroup = [UUID nullUuid]; - tree.lastTopVisibleGroup = [UUID nullUuid]; - - KdbGroup *parentGroup = [tree createGroup:nil]; - parentGroup.name = @"General"; - parentGroup.image = 48; - tree.root = parentGroup; - - for(NSUInteger iImageIndex = 0; iImageIndex < 69; iImageIndex++) { - KdbGroup *group = [tree createGroup:parentGroup]; - group.name = [NSString stringWithFormat:@"Group %ld", iImageIndex]; - group.image = iImageIndex; - [parentGroup addGroup:group]; - } - - return tree; -} - -@end diff --git a/MacPass/KdbEntry+MPAdditions.h b/MacPass/KdbEntry+MPAdditions.h deleted file mode 100644 index a30c5508..00000000 --- a/MacPass/KdbEntry+MPAdditions.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// KdbEntry+MPAdditions.h -// MacPass -// -// Created by Michael Starke on 01.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb.h" - -@interface KdbEntry (MPAdditions) - -@property (nonatomic, readonly) NSImage *icon; - -@end diff --git a/MacPass/KdbEntry+MPAdditions.m b/MacPass/KdbEntry+MPAdditions.m deleted file mode 100644 index aa4db2b5..00000000 --- a/MacPass/KdbEntry+MPAdditions.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// KdbEntry+MPAdditions.m -// MacPass -// -// Created by Michael Starke on 01.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "KdbEntry+MPAdditions.h" -#import "Kdb3Node.h" -#import "Kdb4Node.h" - -#import "MPIconHelper.h" - -@implementation KdbEntry (MPAdditions) - -- (NSImage *)icon { - return [MPIconHelper icon:(MPIconType)self.image]; -} - -@end diff --git a/MacPass/KdbEntry+MPTreeTools.h b/MacPass/KdbEntry+MPTreeTools.h deleted file mode 100644 index 7788cbc1..00000000 --- a/MacPass/KdbEntry+MPTreeTools.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// KdbEntry+MPTreeTools.h -// MacPass -// -// Created by Michael Starke on 10.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb.h" - -@interface KdbEntry (MPTreeTools) - -- (NSUInteger)indexInParent; - -@end diff --git a/MacPass/KdbEntry+MPTreeTools.m b/MacPass/KdbEntry+MPTreeTools.m deleted file mode 100644 index 5e4f760c..00000000 --- a/MacPass/KdbEntry+MPTreeTools.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// KdbEntry+MPTreeTools.m -// MacPass -// -// Created by Michael Starke on 10.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "KdbEntry+MPTreeTools.h" - -@implementation KdbEntry (MPTreeTools) - -- (NSUInteger)indexInParent { - if(self.parent) { - return [self.parent.entries indexOfObject:self]; - } - return NSNotFound; -} - - -@end diff --git a/MacPass/KdbEntry+Undo.h b/MacPass/KdbEntry+Undo.h deleted file mode 100644 index fa93440f..00000000 --- a/MacPass/KdbEntry+Undo.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// KdbEntry+Undo.h -// MacPass -// -// Created by Michael Starke on 12.05.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb.h" - -@interface KdbEntry (Undo) - -- (NSString *)titleUndoable; -- (NSString *)usernameUndoable; -- (NSString *)passwordUndoable; -- (NSString *)urlUndoable; -- (NSString *)notesUndoable; - -- (void)setTitleUndoable:(NSString *)title; -- (void)setUsernameUndoable:(NSString *)username; -- (void)setPasswordUndoable:(NSString *)password; -- (void)setUrlUndoable:(NSString *)url; -- (void)setNotesUndoable:(NSString *)notes; - -- (void)deleteUndoable; -- (void)moveToGroupUndoable:(KdbGroup *)group atIndex:(NSUInteger)index; -- (void)moveToTrashUndoable:(KdbGroup *)trash atIndex:(NSUInteger)index; - -@end diff --git a/MacPass/KdbEntry+Undo.m b/MacPass/KdbEntry+Undo.m deleted file mode 100644 index 778a3aa7..00000000 --- a/MacPass/KdbEntry+Undo.m +++ /dev/null @@ -1,139 +0,0 @@ -// -// KdbEntry+Undo.m -// MacPass -// -// Created by Michael Starke on 12.05.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "KdbEntry+Undo.h" - -#import "Kdb4Node.h" -#import "KdbGroup+Undo.h" -#import "KdbGroup+KVOAdditions.h" -#import "KdbGroup+MPTreeTools.h" - -#ifndef MPSetActionName -#define MPSetActionName(key, comment) \ -if(![[self undoManager] isUndoing]) {\ -[[self undoManager] setActionName:[[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]];\ -} -#endif - -@implementation KdbEntry (Undo) - -- (NSUndoManager *)undoManager { - return [[[NSDocumentController sharedDocumentController] currentDocument] undoManager]; -} - -- (NSString *)titleUndoable { - return [self title]; -} - -- (NSString *)usernameUndoable { - return [self username]; -} - -- (NSString *)passwordUndoable { - return [self password]; -} - -- (NSString *)urlUndoable { - return [self url]; -} - -- (NSString *)notesUndoable { - return [self notes]; -} - -- (void)setTitleUndoable:(NSString *)title { - [[self undoManager] registerUndoWithTarget:self selector:@selector(setTitleUndoable:) object:self.title]; - MPSetActionName(@"SET_TITLE", ""); - - [self _touchModifcationDate]; - [self setTitle:title]; -} - -- (void)setUsernameUndoable:(NSString *)username { - [[self undoManager] registerUndoWithTarget:self selector:@selector(setUsernameUndoable:) object:self.username]; - MPSetActionName(@"SET_USERNAME", ""); - - [self _touchModifcationDate]; - [self setUsername:username]; -} - -- (void)setPasswordUndoable:(NSString *)password { - [[self undoManager] registerUndoWithTarget:self selector:@selector(setPasswordUndoable:) object:self.password]; - MPSetActionName(@"SET_PASSWORT", "Undo set password"); - - [self _touchModifcationDate]; - [self setPassword:password]; -} - -- (void)setUrlUndoable:(NSString *)url { - [[self undoManager] registerUndoWithTarget:self selector:@selector(setUrlUndoable:) object:self.url]; - MPSetActionName(@"SET_URL", "Undo set URL"); - - [self _touchModifcationDate]; - [self setUrl:url]; -} - -- (void)setNotesUndoable:(NSString *)notes { - [[self undoManager] registerUndoWithTarget:self selector:@selector(setNotesUndoable:) object:self.notes]; - MPSetActionName(@"SET_NOTES", "Set Notes"); - - [self _touchModifcationDate]; - [self setNotes:notes]; -} - -- (void)deleteUndoable { - if(!self.parent) { - return; // No parent to be removed from - } - NSUInteger oldIndex = [self.parent.entries indexOfObject:self]; - if(oldIndex == NSNotFound) { - return; // We're not in our parents entries list - } - [[[self undoManager] prepareWithInvocationTarget:self.parent] addEntryUndoable:self atIndex:oldIndex]; - - MPSetActionName(@"DELETE_ENTRY", ""); - - //[[NSNotificationCenter defaultCenter] postNotificationName:@"" object:self userInfo:nil]; - [self.parent removeObjectFromEntriesAtIndex:oldIndex]; -} - -- (void)moveToGroupUndoable:(KdbGroup *)group atIndex:(NSUInteger)index { - [self _moveToGroup:group atIndex:index actionName:NSLocalizedString(@"MOVE_ENTRY", "Move Group")]; -} - -- (void)moveToTrashUndoable:(KdbGroup *)trash atIndex:(NSUInteger)index { - [self _moveToGroup:trash atIndex:index actionName:NSLocalizedString(@"TRASH_ENTRY", "Move Entry to Trash")]; -} - -- (void)_moveToGroup:(KdbGroup *)group atIndex:(NSUInteger)index actionName:(NSString *)name { - if(!group || !self.parent) { - return; // Nothing to be moved about - } - NSUInteger oldIndex = [self.parent.entries indexOfObject:self]; - if(oldIndex == NSNotFound) { - return; // Not found in entries of parent! - } - [[[self undoManager] prepareWithInvocationTarget:self] _moveToGroup:self.parent atIndex:oldIndex actionName:name]; - - MPSetActionName(name, ""); - - [self.parent removeObjectFromEntriesAtIndex:oldIndex]; - // Old indices might be wrong, correct them if necessary - index = MIN(index, [group.entries count]); - [group insertObject:self inEntriesAtIndex:index]; - if([self respondsToSelector:@selector(setLocationChanged:)]) { - id entry = self; - [entry setLocationChanged:[NSDate date]]; - } -} - -- (void)_touchModifcationDate { - self.lastModificationTime = [NSDate date]; -} - -@end \ No newline at end of file diff --git a/MacPass/KdbGroup+KVOAdditions.h b/MacPass/KdbGroup+KVOAdditions.h deleted file mode 100644 index 9638905f..00000000 --- a/MacPass/KdbGroup+KVOAdditions.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// KdbGroup+KVOAdditions.h -// MacPass -// -// Created by Michael Starke on 08.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb.h" - -@interface KdbGroup (KVOAdditions) - -/* KVO Accesors for the entries */ -- (KdbEntry *)objectInEntriesAtIndex:(NSUInteger)index; -- (NSUInteger)countOfEntries; -- (void)insertObject:(KdbEntry *)entry inEntriesAtIndex:(NSUInteger)index; -- (void)removeObjectFromEntriesAtIndex:(NSUInteger)index; - -/* KVO Accessors for the groups */ -- (KdbGroup *)objectInGroupsAtIndex:(NSUInteger)index; -- (NSUInteger)countOfGroups; -- (void)insertObject:(KdbGroup *)group inGroupsAtIndex:(NSUInteger)index; -- (void)removeObjectFromGroupsAtIndex:(NSUInteger)index; - -@end diff --git a/MacPass/KdbGroup+KVOAdditions.m b/MacPass/KdbGroup+KVOAdditions.m deleted file mode 100644 index 3af8ee74..00000000 --- a/MacPass/KdbGroup+KVOAdditions.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// KdbGroup+KVOAdditions.m -// MacPass -// -// Created by Michael Starke on 08.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "KdbGroup+KVOAdditions.h" - -@implementation KdbGroup (KVOAdditions) - -- (void)insertObject:(KdbEntry *)entry inEntriesAtIndex:(NSUInteger)index { - entry.parent = self; - [_entries insertObject:entry atIndex:index]; -} - -- (void)removeObjectFromEntriesAtIndex:(NSUInteger)index { - KdbEntry *entry = _entries[index]; - [_entries removeObjectAtIndex:index]; - entry.parent = nil; -} - -- (NSUInteger)countOfEntries { - return [self.entries count]; -} - -- (KdbEntry *)objectInEntriesAtIndex:(NSUInteger)index { - return self.entries[index]; -} - -- (KdbGroup *)objectInGroupsAtIndex:(NSUInteger)index { - return self.groups[index]; -} - -- (NSUInteger)countOfGroups { - return [self.groups count]; -} - -- (void)insertObject:(KdbGroup *)group inGroupsAtIndex:(NSUInteger)index { - group.parent = self; - [_groups insertObject:group atIndex:index]; -} - -- (void)removeObjectFromGroupsAtIndex:(NSUInteger)index { - KdbGroup *group = (self.groups)[index]; - [_groups removeObjectAtIndex:index]; - group.parent = nil; -} - -@end diff --git a/MacPass/KdbGroup+MPAdditions.h b/MacPass/KdbGroup+MPAdditions.h deleted file mode 100644 index 739d1e68..00000000 --- a/MacPass/KdbGroup+MPAdditions.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// KdbGroup+MPAdditions.h -// MacPass -// -// Created by Michael Starke on 01.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb.h" - -@interface KdbGroup (MPAdditions) - -/* Adapter to load images based on icon index */ -@property (nonatomic, readonly) NSImage *icon; - -/* Walks the tree up to the root element */ -- (KdbGroup *)root; - -/* Removes all Groups and Entries from this group*/ -- (void)clear; - -@end diff --git a/MacPass/KdbGroup+MPAdditions.m b/MacPass/KdbGroup+MPAdditions.m deleted file mode 100644 index e6a25b3a..00000000 --- a/MacPass/KdbGroup+MPAdditions.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// KdbGroup+MPAdditions.m -// MacPass -// -// Created by Michael Starke on 01.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "KdbGroup+MPAdditions.h" -#import "KdbGroup+KVOAdditions.h" -#import "MPIconHelper.h" - -#import "Kdb4Node.h" - -@implementation KdbGroup (MPAdditions) - -- (NSImage *)icon { - if([self respondsToSelector:@selector(customIconUuid)]) { - } - return [MPIconHelper icon:(MPIconType)self.image]; -} - -- (KdbGroup *)root { - if(self.parent) { - return [self.parent root]; - } - return self; -} - -- (void)clear { - NSUInteger groupCount = [_groups count]; - for(NSInteger index = (groupCount - 1); index > -1; index--) { - [self removeObjectFromGroupsAtIndex:index]; - } - NSUInteger entryCount = [_entries count]; - for(NSInteger index = (entryCount - 1); index > -1; index--) { - [self removeObjectFromEntriesAtIndex:index]; - } -} -@end diff --git a/MacPass/KdbGroup+MPTreeTools.h b/MacPass/KdbGroup+MPTreeTools.h deleted file mode 100644 index 1f042594..00000000 --- a/MacPass/KdbGroup+MPTreeTools.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// KdbGroup+MPTreeTools.h -// MacPass -// -// Created by michael starke on 19.02.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb.h" -@class UUID; - -@interface KdbGroup (MPTreeTools) - -/* Returns all groups under this group and it's subgroups */ -- (NSArray *)childGroups; -/* Returns all entries under this group and it's subgroups */ -- (NSArray *)childEntries; -/* Returns the entry with the UUID */ -- (KdbEntry *)entryForUUID:(UUID *)uuid; -/** - * Searches through all subgroups and loactes the Group with the given UUID - * @param uuid UUID of the searched group - * @return group with matching UUID, otherwise nil - */ -- (KdbGroup *)groupForUUID:(UUID *)uuid; -/** - * Determines, if the reciever is an anchestor of the given group - * @param group The group to test for anchestry - * @return YES, if the receiver is an anchestor of group - */ -- (BOOL)isAnchestorOfGroup:(KdbGroup *)group; - -@end \ No newline at end of file diff --git a/MacPass/KdbGroup+MPTreeTools.m b/MacPass/KdbGroup+MPTreeTools.m deleted file mode 100644 index 5edb4b9f..00000000 --- a/MacPass/KdbGroup+MPTreeTools.m +++ /dev/null @@ -1,66 +0,0 @@ -// -// KdbGroup+MPTreeTools.m -// MacPass -// -// Created by michael starke on 19.02.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "KdbGroup+MPTreeTools.h" -#import "Kdb4Node.h" -#import "Kdb3Node.h" - -@implementation KdbGroup (MPTreeTools) - -- (NSArray *)childGroups { - NSMutableArray *childGroups = [NSMutableArray arrayWithCapacity:[self.groups count]]; - [childGroups addObjectsFromArray:self.groups]; - for(KdbGroup *childGroup in self.groups) { - [childGroups addObjectsFromArray:[childGroup childGroups]]; - } - return childGroups; -} - -- (NSArray *)childEntries { - NSMutableArray *childEntries = [NSMutableArray arrayWithCapacity:[self.groups count] + [self.entries count]]; - [childEntries addObjectsFromArray:self.entries]; - for( KdbGroup *childGroup in self.groups) { - [childEntries addObjectsFromArray:[childGroup childEntries]]; - } - return childEntries; -} - -- (KdbEntry *)entryForUUID:(UUID *)uuid { - NSArray *childEntries = [self childEntries]; - NSArray *filterdEntries = [childEntries filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { - return [uuid isEqual:(UUID *)[evaluatedObject uuid]]; - }]]; - NSAssert([filterdEntries count] <= 1, @"UUID hast to be unique"); - return [filterdEntries lastObject]; -} - -- (KdbGroup *)groupForUUID:(UUID *)uuid { - NSArray *childGroups = [self childGroups]; - NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { - return [uuid isEqual:(UUID *)[evaluatedObject uuid]]; - }]; - NSArray *filteredGroups = [childGroups filteredArrayUsingPredicate:predicate]; - NSAssert([filteredGroups count] <= 1, @"UUID hast to be unique"); - return [filteredGroups lastObject]; -} - -- (BOOL)isAnchestorOfGroup:(KdbGroup *)group { - if(group == nil) { - return NO; - } - KdbGroup *ancestor = group.parent; - while(ancestor) { - if(ancestor == self) { - return YES; - } - ancestor = ancestor.parent; - } - return NO; -} - -@end \ No newline at end of file diff --git a/MacPass/KdbGroup+Undo.h b/MacPass/KdbGroup+Undo.h deleted file mode 100644 index 0c50243b..00000000 --- a/MacPass/KdbGroup+Undo.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// KdbGroup+Undo.h -// MacPass -// -// Created by Michael Starke on 18.05.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb.h" - -APPKIT_EXTERN NSString *const MPGroupNameUndoableKey; - -@interface KdbGroup (Undo) - -- (NSUndoManager *)undoManager; - -- (NSString *)nameUndoable; -- (void)setNameUndoable:(NSString *)newName; - -- (void)deleteUndoable; -- (void)addGroupUndoable:(KdbGroup *)group atIndex:(NSUInteger)index; -- (void)addEntryUndoable:(KdbEntry *)entry atIndex:(NSUInteger)index; -- (void)moveToGroupUndoable:(KdbGroup *)group atIndex:(NSUInteger)index; -- (void)moveToTrashUndoable:(KdbGroup *)trash atIndex:(NSUInteger)index; - -@end diff --git a/MacPass/KdbGroup+Undo.m b/MacPass/KdbGroup+Undo.m deleted file mode 100644 index 0a33a3b0..00000000 --- a/MacPass/KdbGroup+Undo.m +++ /dev/null @@ -1,114 +0,0 @@ -// -// KdbGroup+Undo.m -// MacPass -// -// Created by Michael Starke on 18.05.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "KdbGroup+Undo.h" -#import "KdbGroup+KVOAdditions.h" -#import "KdbEntry+Undo.h" - -NSString *const MPGroupNameUndoableKey = @"nameUndoable"; - -@implementation KdbGroup (Undo) - -- (NSUndoManager *)undoManager { - return [[[NSDocumentController sharedDocumentController] currentDocument] undoManager]; -} - -- (NSString *)nameUndoable { - return [self name]; -} - -- (void)setNameUndoable:(NSString *)newName { - [[self undoManager] registerUndoWithTarget:self selector:@selector(setNameUndoable:) object:self.name]; - - if(![[self undoManager] isUndoing]) { - [[self undoManager] setActionName:NSLocalizedString(@"SET_NAME", "Set Name")]; - } - - self.name = newName; -} - -- (void)deleteUndoable { - if(!self.parent) { - return; - } - NSUInteger oldIndex = [self.parent.groups indexOfObject:self]; - if(oldIndex == NSNotFound) { - return; // Inconsistent data - } - [[[self undoManager] prepareWithInvocationTarget:self.parent] addGroupUndoable:self atIndex:oldIndex]; - - if(![[self undoManager] isUndoing]) { - [[self undoManager] setActionName:NSLocalizedString(@"DELETE_GROUP", "Delete Group")]; - } - - [self.parent removeObjectFromGroupsAtIndex:oldIndex]; -} - -- (void)addGroupUndoable:(KdbGroup *)group atIndex:(NSUInteger)index { - if(!group) { - return; - } - - [[[self undoManager] prepareWithInvocationTarget:group] deleteUndoable]; - - if(![[self undoManager] isUndoing]) { - [[self undoManager] setActionName:NSLocalizedString(@"ADD_GROUP", "Add Group")]; - } - - index = MIN(index, [group.groups count]); - [self insertObject:group inGroupsAtIndex:index]; -} - -- (void)addEntryUndoable:(KdbEntry *)entry atIndex:(NSUInteger)index { - if(!entry) { - return; - } - index = MIN(index, [self.entries count]); - [[[self undoManager] prepareWithInvocationTarget:entry] deleteUndoable]; - - if(![[self undoManager] isUndoing]) { - [[self undoManager] setActionName:NSLocalizedString(@"ADD_ENTRY", "Add Entry")]; - } - - [self insertObject:entry inEntriesAtIndex:index]; -} - -- (void)moveToGroupUndoable:(KdbGroup *)group atIndex:(NSUInteger)index { - [self _moveToGroup:group atIndex:index actionName:NSLocalizedString(@"MOVE_GROUP", "Move Group" )]; -} - -- (void)moveToTrashUndoable:(KdbGroup *)trash atIndex:(NSUInteger)index { - [self _moveToGroup:trash atIndex:index actionName:NSLocalizedString(@"TRASH_GROUP", "Move Group to Trash")]; -} - -- (void)_moveToGroup:(KdbGroup *)group atIndex:(NSUInteger)index actionName:(NSString *)actionName { - if(!self.parent || !group) { - return; // No target or origin - } - if(self.parent == group) { - // Correct the index to accomodate the removal - index--; - } - - NSUInteger oldIndex = [self.parent.groups indexOfObject:self]; - if(oldIndex == NSNotFound) { - return; // We aren't in our parents groups list. - } - [[[self undoManager] prepareWithInvocationTarget:self] moveToGroupUndoable:self.parent atIndex:oldIndex]; - - if(![[self undoManager] isUndoing]) { - [[self undoManager] setActionName:actionName]; - } - - [self.parent removeObjectFromGroupsAtIndex:oldIndex]; - index = MIN(index, [group.groups count]); - index = MAX(index, 0 ); - [group insertObject:self inGroupsAtIndex:index]; -} - -@end diff --git a/MacPass/KdbTree+MPAdditions.h b/MacPass/KdbTree+MPAdditions.h deleted file mode 100644 index 42f30555..00000000 --- a/MacPass/KdbTree+MPAdditions.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// KdbTree+MPAdditions.h -// MacPass -// -// Created by michael starke on 20.02.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb.h" - -@class BinaryRef; -@class Binary; - -@interface KdbTree (MPAdditions) - -- (NSArray *)allEntries; - -- (NSArray *)allGroups; - -@end diff --git a/MacPass/KdbTree+MPAdditions.m b/MacPass/KdbTree+MPAdditions.m deleted file mode 100644 index b9b86cb6..00000000 --- a/MacPass/KdbTree+MPAdditions.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// KdbTree+MPAdditions.m -// MacPass -// -// Created by michael starke on 20.02.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "KdbTree+MPAdditions.h" -#import "KdbGroup+MPTreeTools.h" - -#import "NSMutableData+Base64.h" -#import "Kdb3Node.h" -#import "Kdb4Node.h" - -@implementation KdbTree (MPAdditions) - -- (NSArray *)allGroups { - return [self.root childGroups]; -} - -- (NSArray *)allEntries { - return [self.root childEntries]; -} - -@end diff --git a/MacPass/MPAddEntryContextMenuDelegate.m b/MacPass/MPAddEntryContextMenuDelegate.m index 1eb350e6..de63420b 100644 --- a/MacPass/MPAddEntryContextMenuDelegate.m +++ b/MacPass/MPAddEntryContextMenuDelegate.m @@ -11,7 +11,8 @@ #import "MPDocumentWindowController.h" #import "MPActionHelper.h" -#import "KdbGroup+MPTreeTools.h" +#import "KPKEntry.h" +#import "KPKGroup.h" #define EDIT_TEMPLATES_ITEM_TAG 10; @@ -31,7 +32,7 @@ [menu addItemWithTitle:NSLocalizedString(@"EDIT_TEMPLATE_GROUP", "") action:[MPActionHelper actionOfType:MPActionEditTemplateGroup] keyEquivalent:@""]; [menu addItem:[NSMenuItem separatorItem]]; - for(KdbEntry *entry in [document.templates childEntries]) { + for(KPKEntry *entry in [document.templates childEntries]) { NSString *templateMask = NSLocalizedString(@"NEW_ENTRY_WITH_TEMPLATE_%@", ""); NSMenuItem *templateItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[NSString stringWithFormat:templateMask, entry.title] action:@selector(createEntryFromTemplate:) diff --git a/MacPass/MPAttachmentTableDataSource.m b/MacPass/MPAttachmentTableDataSource.m index 55a2ae79..c1d40a7e 100644 --- a/MacPass/MPAttachmentTableDataSource.m +++ b/MacPass/MPAttachmentTableDataSource.m @@ -9,9 +9,6 @@ #import "MPAttachmentTableDataSource.h" #import "MPDocument.h" -#import "Kdb3Entry+KVOAdditions.h" -#import "Kdb4Entry+KVOAdditions.h" - @implementation MPAttachmentTableDataSource - (NSDragOperation)tableView:(NSTableView *)tableView diff --git a/MacPass/MPAttachmentTableViewDelegate.m b/MacPass/MPAttachmentTableViewDelegate.m index 1d550a5a..ea76a13e 100644 --- a/MacPass/MPAttachmentTableViewDelegate.m +++ b/MacPass/MPAttachmentTableViewDelegate.m @@ -11,8 +11,8 @@ #import "MPDocument.h" #import "MPSelectedAttachmentTableCellView.h" -#import "Kdb4Node.h" -#import "Kdb3Node.h" +#import "KPKEntry.h" +#import "KPKBinary.h" #import "HNHTableRowView.h" @@ -22,16 +22,8 @@ NSTableView *tableView = [notification object]; MPDocument *document = [[[tableView window] windowController] document]; NSIndexSet *allColumns = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [[tableView tableColumns] count])]; - if([document.selectedEntry isKindOfClass:[Kdb4Entry class]]) { - Kdb4Entry *entryv4 = (Kdb4Entry *)document.selectedEntry; - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [entryv4.binaries count] )]; - [tableView reloadDataForRowIndexes:indexSet columnIndexes:allColumns]; - } - if([document.selectedEntry isKindOfClass:[Kdb3Entry class]]) { - Kdb3Entry *entryv3 = (Kdb3Entry *)document.selectedEntry; - NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, (entryv3.binary ? 1 : 0 ))]; - [tableView reloadDataForRowIndexes:indexSet columnIndexes:allColumns]; - } + NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [document.selectedEntry.binaries count] )]; + [tableView reloadDataForRowIndexes:indexSet columnIndexes:allColumns]; } - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { @@ -54,17 +46,11 @@ view = [tableView makeViewWithIdentifier:@"NormalCell" owner:tableView]; } /* Bind view */ - if([document.selectedEntry isKindOfClass:[Kdb4Entry class]]) { - Kdb4Entry *entry = (Kdb4Entry *)document.selectedEntry; - BinaryRef *binaryRef = entry.binaries[row]; - [[view textField] bind:NSValueBinding toObject:binaryRef withKeyPath:@"key" options:nil]; - [[view imageView] setImage:[[NSWorkspace sharedWorkspace] iconForFileType:[binaryRef.key pathExtension]]]; - } - else { - Kdb3Entry *entry= (Kdb3Entry *)document.selectedEntry; - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"binaryDesc" options:nil]; - [[view imageView] setImage:[[NSWorkspace sharedWorkspace] iconForFileType:[entry.binaryDesc pathExtension]]]; - } + KPKEntry *entry = document.selectedEntry; + NSAssert([entry.binaries count] > row, @"Indes needs to be valid for binaries"); + KPKBinary *binary = entry.binaries[row]; + [[view textField] bind:NSValueBinding toObject:binary withKeyPath:@"name" options:nil]; + [[view imageView] setImage:[[NSWorkspace sharedWorkspace] iconForFileType:[binary.name pathExtension]]]; return view; } diff --git a/MacPass/MPConstants.h b/MacPass/MPConstants.h index 9383a904..d3134db3 100644 --- a/MacPass/MPConstants.h +++ b/MacPass/MPConstants.h @@ -12,9 +12,6 @@ #import FOUNDATION_EXPORT NSString *const MPPasteBoardType; -FOUNDATION_EXPORT NSString *const MPEntryUTI; -FOUNDATION_EXPORT NSString *const MPGroupUTI; -FOUNDATION_EXTERN NSString *const MPUUIDUTI; FOUNDATION_EXPORT NSString *const MPErrorDomain; #endif diff --git a/MacPass/MPConstants.m b/MacPass/MPConstants.m index 7a41b620..37cad268 100644 --- a/MacPass/MPConstants.m +++ b/MacPass/MPConstants.m @@ -10,6 +10,3 @@ NSString *const MPPasteBoardType = @"com.hicknhack.macpass.pasteboard"; NSString *const MPErrorDomain = @"com.hicknhack.macpass.error"; -NSString *const MPEntryUTI = @"com.hicknhack.macpass.entry"; -NSString *const MPGroupUTI = @"com.hicknhack.macpass.group"; -NSString *const MPUUIDUTI = @"com.hicknhack.macpass.UUID"; \ No newline at end of file diff --git a/MacPass/MPCustomFieldTableViewDelegate.m b/MacPass/MPCustomFieldTableViewDelegate.m index e9aa55d1..5a747347 100644 --- a/MacPass/MPCustomFieldTableViewDelegate.m +++ b/MacPass/MPCustomFieldTableViewDelegate.m @@ -10,28 +10,31 @@ #import "MPDocument.h" #import "MPCustomFieldTableCellView.h" -#import "Kdb4Node.h" -#import "StringField+Undo.h" +#import "KPKEntry.h" +#import "KPKAttribute.h" @implementation MPCustomFieldTableViewDelegate - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { MPDocument *document = [[[tableView window] windowController] document]; - if(![document.selectedEntry isKindOfClass:[Kdb4Entry class]]) { - return nil; - } - Kdb4Entry *entry = (Kdb4Entry *)document.selectedEntry; + + KPKEntry *entry = document.selectedEntry; MPCustomFieldTableCellView *view = [tableView makeViewWithIdentifier:@"SelectedCell" owner:tableView]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_customFieldFrameChanged:) name:NSViewFrameDidChangeNotification object:view]; - if([document.selectedEntry isKindOfClass:[Kdb4Entry class]]) { - StringField *stringField = entry.stringFields[row]; - NSDictionary *validateOptions = @{ NSValidatesImmediatelyBindingOption: @YES }; - [view.labelTextField bind:NSValueBinding toObject:stringField withKeyPath:MPStringFieldKeyUndoableKey options:validateOptions]; - [view.valueTextField bind:NSValueBinding toObject:stringField withKeyPath:MPStringFieldValueUndoableKey options:nil]; - [view.removeButton setTarget:self.viewController]; - [view.removeButton setAction:@selector(removeCustomField:)]; - [view.removeButton setTag:row]; - } + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_customFieldFrameChanged:) + name:NSViewFrameDidChangeNotification + object:view]; + + NSAssert([entry.customAttributes count] > row, @"Count of custom attributes must match row"); + KPKAttribute *attribute = entry.customAttributes[row]; + NSDictionary *validateOptions = @{ NSValidatesImmediatelyBindingOption: @YES }; + [view.labelTextField bind:NSValueBinding toObject:attribute withKeyPath:@"key" options:validateOptions]; + [view.valueTextField bind:NSValueBinding toObject:attribute withKeyPath:@"value" options:nil]; + [view.removeButton setTarget:self.viewController]; + [view.removeButton setAction:@selector(removeCustomField:)]; + [view.removeButton setTag:row]; + return view; } diff --git a/MacPass/MPDatabaseSettingsWindowController.m b/MacPass/MPDatabaseSettingsWindowController.m index fead83d0..95f02c67 100644 --- a/MacPass/MPDatabaseSettingsWindowController.m +++ b/MacPass/MPDatabaseSettingsWindowController.m @@ -13,14 +13,16 @@ #import "MPIconHelper.h" #import "MPSettingsHelper.h" +#import "KPKGroup.h" +#import "KPKTree.h" +#import "KPKMetaData.h" +#import "KPKNode+IconImage.h" + #import "HNHRoundedTextField.h" #import "HNHRoundedSecureTextField.h" #import "NSString+Empty.h" -#import "Kdb.h" -#import "Kdb4Node.h" -#import "KdbGroup+MPAdditions.h" @interface MPDatabaseSettingsWindowController () { MPDocument *_document; @@ -56,19 +58,20 @@ - (IBAction)save:(id)sender { /* General */ - _document.treeV4.databaseDescription = [self.databaseDescriptionTextView string]; - _document.treeV4.databaseName = [self.databaseNameTextField stringValue]; + KPKMetaData *metaData = _document.tree.metaData; + metaData.databaseDescription = [self.databaseDescriptionTextView string]; + metaData.databaseName = [self.databaseNameTextField stringValue]; /* Display */ /* Advanced */ - _document.treeV4.recycleBinEnabled = self.trashEnabled; + metaData.recycleBinEnabled = self.trashEnabled; NSMenuItem *trashMenuItem = [self.selectRecycleBinGroupPopUpButton selectedItem]; - KdbGroup *trashGroup = [trashMenuItem representedObject]; + KPKGroup *trashGroup = [trashMenuItem representedObject]; [_document useGroupAsTrash:trashGroup]; NSMenuItem *templateMenuItem = [self.templateGroupPopUpButton selectedItem]; - KdbGroup *templateGroup = [templateMenuItem representedObject]; + KPKGroup *templateGroup = [templateMenuItem representedObject]; [_document useGroupAsTemplate:templateGroup]; BOOL protectNotes = [self.protectNotesCheckButton state] == NSOnState; @@ -77,24 +80,22 @@ BOOL protectURL = [self.protectURLCheckButton state] == NSOnState; BOOL protectUsername = [self.protectUserNameCheckButton state] == NSOnState; - if(_document.version == MPDatabaseVersion4) { - _document.treeV4.protectNotes = protectNotes; - _document.treeV4.protectPassword = protectPassword; - _document.treeV4.protectTitle = protectTitle; - _document.treeV4.protectUrl = protectURL; - _document.treeV4.protectUserName = protectUsername; - _document.treeV4.defaultUserName = [self.defaultUsernameTextField stringValue]; + metaData.protectNotes = protectNotes; + metaData.protectPassword = protectPassword; + metaData.protectTitle = protectTitle; + metaData.protectUrl = protectURL; + metaData.protectUserName = protectUsername; + metaData.defaultUserName = [self.defaultUsernameTextField stringValue]; - } - else { - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + /* + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setBool:protectNotes forKey:kMPSettingsKeyLegacyHideNotes]; [defaults setBool:protectPassword forKey:kMPSettingsKeyLegacyHidePassword]; [defaults setBool:protectTitle forKey:kMPSettingsKeyLegacyHideTitle]; [defaults setBool:protectURL forKey:kMPSettingsKeyLegacyHideURL]; [defaults setBool:protectUsername forKey:kMPSettingsKeyLegacyHideUsername]; [defaults synchronize]; - } + */ [self close:nil]; } @@ -108,11 +109,11 @@ return; } /* Update all stuff that might have changed */ - Kdb4Tree *tree = _document.treeV4; - [self _setupDatabase:tree]; - [self _setupProtectionTab:tree]; - [self _setupAdvancedTab:tree]; - [self _setupTemplatesTab:tree]; + KPKMetaData *metaData = _document.tree.metaData; + [self _setupDatabase:metaData]; + [self _setupProtectionTab:metaData]; + [self _setupAdvancedTab:_document.tree]; + [self _setupTemplatesTab:_document.tree]; self.isDirty = NO; } @@ -142,7 +143,8 @@ case MPDatabaseSettingsTabAdvanced: case MPDatabaseSettingsTabGeneral: case MPDatabaseSettingsTabTemplates: - return (_document.version == MPDatabaseVersion4); + return YES; + //return (_document.version == MPDatabaseVersion4); default: return NO; @@ -150,61 +152,29 @@ } #pragma mark Private Helper -- (void)_setupDatabase:(Kdb4Tree *)tree { - BOOL isKdbx = (nil != tree); - [self.databaseDescriptionTextView setEditable:isKdbx]; - [self.databaseNameTextField setEnabled:isKdbx]; - if(isKdbx) { - [self.databaseNameTextField setStringValue:tree.databaseName]; - [self.databaseDescriptionTextView setString:tree.databaseDescription]; - } - else { - [self.databaseNameTextField setStringValue:_missingFeature]; - [self.databaseDescriptionTextView setString:_missingFeature]; - } +- (void)_setupDatabase:(KPKMetaData *)metaData { + [self.databaseNameTextField setStringValue:metaData.databaseName]; + [self.databaseDescriptionTextView setString:metaData.databaseDescription]; } -- (void)_setupProtectionTab:(Kdb4Tree *)tree { - BOOL isKdbX = (nil != tree); - - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - - BOOL protectNotes = isKdbX ? tree.protectNotes : [defaults boolForKey:kMPSettingsKeyLegacyHideNotes]; - BOOL protectPassword = isKdbX ? tree.protectPassword : [defaults boolForKey:kMPSettingsKeyLegacyHidePassword]; - BOOL protectTitle = isKdbX ? tree.protectTitle : [defaults boolForKey:kMPSettingsKeyLegacyHideTitle]; - BOOL protectUrl = isKdbX ? tree.protectUrl : [defaults boolForKey:kMPSettingsKeyLegacyHideURL]; - BOOL protectUsername = isKdbX ? tree.protectUserName : [defaults boolForKey:kMPSettingsKeyLegacyHideUsername]; - - [self.protectNotesCheckButton setState:protectNotes ? NSOnState : NSOffState ]; - [self.protectPasswortCheckButton setState:protectPassword ? NSOnState : NSOffState]; - [self.protectTitleCheckButton setState:protectTitle ? NSOnState : NSOffState]; - [self.protectURLCheckButton setState:protectUrl ? NSOnState : NSOffState]; - [self.protectUserNameCheckButton setState:protectUsername ? NSOnState : NSOffState]; +- (void)_setupProtectionTab:(KPKMetaData *)metaData { + [self.protectNotesCheckButton setState:metaData.protectNotes ? NSOnState : NSOffState ]; + [self.protectPasswortCheckButton setState:metaData.protectPassword ? NSOnState : NSOffState]; + [self.protectTitleCheckButton setState:metaData.protectTitle ? NSOnState : NSOffState]; + [self.protectURLCheckButton setState:metaData.protectUrl ? NSOnState : NSOffState]; + [self.protectUserNameCheckButton setState:metaData.protectUserName ? NSOnState : NSOffState]; } -- (void)_setupAdvancedTab:(Kdb4Tree *)tree { - BOOL isKdbX = (nil != tree); - - self.trashEnabled = isKdbX ? tree.recycleBinEnabled : NO; - +- (void)_setupAdvancedTab:(KPKTree *)tree { [self.enableRecycleBinCheckButton bind:NSValueBinding toObject:self withKeyPath:@"trashEnabled" options:nil]; - [self.enableRecycleBinCheckButton setEnabled:isKdbX]; [self.selectRecycleBinGroupPopUpButton bind:NSEnabledBinding toObject:self withKeyPath:@"trashEnabled" options:nil]; - if(isKdbX) { - [self _updateTrashFolders:tree]; - } + [self _updateTrashFolders:tree]; } -- (void)_setupTemplatesTab:(Kdb4Tree *)tree { - if(tree) { - [self.defaultUsernameTextField setStringValue:tree.defaultUserName]; - [self.defaultUsernameTextField setEditable:YES]; - [self _updateTemplateGroup:tree]; - } - else { - [self.defaultUsernameTextField setStringValue:_missingFeature]; - [self.defaultUsernameTextField setEditable:NO]; - } +- (void)_setupTemplatesTab:(KPKTree *)tree { + [self.defaultUsernameTextField setStringValue:tree.metaData.defaultUserName]; + [self.defaultUsernameTextField setEditable:YES]; + [self _updateTemplateGroup:tree]; } - (void)_updateFirstResponder { @@ -229,18 +199,18 @@ } } -- (void)_updateTrashFolders:(Kdb4Tree *)tree { +- (void)_updateTrashFolders:(KPKTree *)tree { NSMenu *menu = [self _buildTrashTreeMenu:tree]; [self.selectRecycleBinGroupPopUpButton setMenu:menu]; } -- (void)_updateTemplateGroup:(Kdb4Tree *)tree { +- (void)_updateTemplateGroup:(KPKTree *)tree { NSMenu *menu = [self _buildTemplateTreeMenu:tree]; [self.templateGroupPopUpButton setMenu:menu]; } -- (NSMenu *)_buildTrashTreeMenu:(Kdb4Tree *)tree { - NSMenu *menu = [self _buildTreeMenu:tree preselect:tree.recycleBinUuid]; +- (NSMenu *)_buildTrashTreeMenu:(KPKTree *)tree { + NSMenu *menu = [self _buildTreeMenu:tree preselect:tree.metaData.recycleBinUuid]; NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"AUTOCREATE_TRASH_FOLDER", @"Menu item for automatic trash creation") action:NULL @@ -251,8 +221,8 @@ return menu; } -- (NSMenu *)_buildTemplateTreeMenu:(Kdb4Tree *)tree { - NSMenu *menu = [self _buildTreeMenu:tree preselect:tree.entryTemplatesGroup]; +- (NSMenu *)_buildTemplateTreeMenu:(KPKTree *)tree { + NSMenu *menu = [self _buildTreeMenu:tree preselect:tree.metaData.entryTemplatesGroup]; NSMenuItem *selectItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"NO_TEMPLATE_GROUP", @"Menu item to reset the template groups") action:NULL @@ -264,18 +234,16 @@ } -- (NSMenu *)_buildTreeMenu:(Kdb4Tree *)tree preselect:(UUID *)uuid { +- (NSMenu *)_buildTreeMenu:(KPKTree *)tree preselect:(NSUUID *)uuid { NSMenu *menu = [[NSMenu alloc] init]; [menu setAutoenablesItems:NO]; - - /* Trash and Templates can be nested, so wee need to adhere to this :( */ - for(Kdb4Group *group in tree.root.groups) { + for(KPKGroup *group in tree.root.groups) { NSMenuItem *groupItem = [[NSMenuItem alloc] init]; - [groupItem setImage:group.icon]; + [groupItem setImage:group.iconImage]; [groupItem setTitle:group.name]; [groupItem setRepresentedObject:group]; [groupItem setEnabled:YES]; diff --git a/MacPass/MPDocument+Attachments.m b/MacPass/MPDocument+Attachments.m index b7d4b2eb..0d539e4e 100644 --- a/MacPass/MPDocument+Attachments.m +++ b/MacPass/MPDocument+Attachments.m @@ -8,169 +8,21 @@ #import "MPDocument.h" -#import "NSMutableData+Base64.h" -#import "NSData+Gzip.h" - -#import "Kdb3Node.h" -#import "Kdb3Entry+KVOAdditions.h" -#import "Kdb4Node.h" -#import "Kdb4Entry+KVOAdditions.h" +#import "KPKEntry.h" +#import "KPKBinary.h" @implementation MPDocument (Attachments) -- (void)addAttachment:(NSURL *)location toEntry:(KdbEntry *)anEntry { +- (void)addAttachment:(NSURL *)location toEntry:(KPKEntry *)anEntry { NSError *error = nil; NSDictionary *resourceKeys = [location resourceValuesForKeys:@[NSURLIsDirectoryKey] error:&error]; if([resourceKeys[ NSURLIsDirectoryKey ] boolValue] == YES ) { - return; // We do not add whol directories + return; // We do not add whole directories } - NSString *fileName = [location lastPathComponent]; - if([anEntry isKindOfClass:[Kdb3Entry class]]) { - Kdb3Entry *entry = (Kdb3Entry *)anEntry; - NSData *binaryData = [NSData dataWithContentsOfURL:location options:NSDataReadingUncached error:&error]; - if(!binaryData) { - [NSApp presentError:error]; - binaryData = nil; - error = nil; - return; // failed - } - entry.binary = binaryData; - entry.binaryDesc = fileName; - [entry insertObject:@"" inBinariesAtIndex:1]; + KPKBinary *binary = [[KPKBinary alloc] initWithContentsOfURL:location]; + if(binary) { + [anEntry addBinary:binary]; } - if( [anEntry isKindOfClass:[Kdb4Entry class]]) { - Kdb4Entry *entry = (Kdb4Entry *)anEntry; - NSData *fileData = [NSData dataWithContentsOfURL:location options:NSDataReadingMappedIfSafe error:&error]; - if(!fileData) { - [NSApp presentError:error]; - fileData = nil; - error = nil; - return; // failed - } - Binary *binary = [[Binary alloc] init]; - NSUInteger nextId = [self nextBinaryId]; - if(nextId == NSNotFound) { - binary = nil; - return; // No id found. Something went wrong - } - binary.binaryId = nextId; - binary.compressed = (self.treeV4.compressionAlgorithm != KPLCompressionNone); - NSData *encodedData; - if(binary.compressed) { - switch(self.treeV4.compressionAlgorithm) { - case KPLCompressionGzip: { - NSData *compressedData = [fileData gzipDeflate]; - encodedData = [NSMutableData mutableDataWithBase64EncodedData:compressedData]; - break; - } - default: - NSAssert(NO, @"Unsupported Compression Algorithm"); - binary = nil; - encodedData = nil; - fileData = nil; - return; - } - } - else { - encodedData = fileData; - } - binary.data = [[NSString alloc] initWithData:encodedData encoding:NSUTF8StringEncoding]; - - [self.treeV4.binaries addObject:binary]; - BinaryRef *ref = [[BinaryRef alloc] init]; - ref.key = fileName; - ref.ref = binary.binaryId; - [entry insertObject:ref inBinariesAtIndex:[entry.binaries count]]; - } -} - -- (void)removeAttachment:(BinaryRef *)reference fromEntry:(KdbEntry *)anEntry { - if(self.version != MPDatabaseVersion4) { - return; // Wrong Database version; - } - Binary *binary = [self findBinary:reference]; - Kdb4Entry *entry = (Kdb4Entry *)anEntry; - NSUInteger index = [entry.binaries indexOfObject:reference]; - if(index == NSNotFound) { - return; // No Reference for this entry found - } - [entry removeObjectFromBinariesAtIndex:index]; - [self.treeV4.binaries removeObject:binary]; -} - -- (void)removeAttachmentFromEntry:(KdbEntry *)anEntry { - if(self.version != MPDatabaseVersion3) { - return; - } - Kdb3Entry *entry = (Kdb3Entry *)anEntry; - [entry removeObjectFromBinariesAtIndex:0]; -} - -- (Binary *)findBinary:(BinaryRef *)reference { - if(self.version != MPDatabaseVersion4) { - return nil; - } - NSPredicate *filterPredicate = [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { - Binary *binaryFile = evaluatedObject; - return (binaryFile.binaryId == reference.ref); - }]; - NSArray *filteredBinary = [self.treeV4.binaries filteredArrayUsingPredicate:filterPredicate]; - return [filteredBinary lastObject]; -} - -- (void)saveAttachmentForItem:(id)item toLocation:(NSURL *)location { - NSData *fileData = [self attachmentDataForItem:item]; - if(!fileData) { - return; // No data to save; - } - NSError *error = nil; - if( ![fileData writeToURL:location options:NSDataWritingAtomic error:&error] ) { - [NSApp presentError:error]; - } -} - -- (NSData *)attachmentDataForItem:(id)item { - if([item isKindOfClass:[Kdb3Entry class]]) { - Kdb3Entry *entry = (Kdb3Entry *)item; - return entry.binary; - } - else if([item isKindOfClass:[BinaryRef class]]) { - Binary *binary = [self findBinary:item]; - NSData *rawData = nil; - if(binary) { - if(binary.compressed) { - rawData = [NSMutableData mutableDataWithBase64DecodedData:[binary.data dataUsingEncoding:NSUTF8StringEncoding]]; - rawData = [rawData gzipInflate]; - } - else { - rawData = [NSMutableData mutableDataWithBase64DecodedData:[binary.data dataUsingEncoding:NSUTF8StringEncoding]]; - } - return rawData; - } - } - return nil; -} - -- (NSString *)attachmenFileNameForItem:(id)item { - if([item isKindOfClass:[Kdb3Entry class]]) { - Kdb3Entry *entry = (Kdb3Entry *)item; - return entry.binaryDesc; - } - else if([item isKindOfClass:[BinaryRef class]]) { - return ((BinaryRef *)item).key; - } - return nil; -} - -- (NSUInteger)nextBinaryId { - if(self.version != MPDatabaseVersion4) { - return NSNotFound; - } - NSUInteger maxKey = 0; - for(Binary *binary in self.treeV4.binaries) { - maxKey = MAX(binary.binaryId, maxKey); - } - return (maxKey + 1); } @end diff --git a/MacPass/MPDocument.h b/MacPass/MPDocument.h index 6c540e27..85b00e48 100644 --- a/MacPass/MPDocument.h +++ b/MacPass/MPDocument.h @@ -22,17 +22,11 @@ APPKIT_EXTERN NSString *const MPDocumentDidChangeCurrentGroupNotication; APPKIT_EXTERN NSString *const MPDocumnetDidChangeCurrentEntryNotification; */ -@class KdbGroup; -@class KdbEntry; -@class KdbTree; -@class Kdb4Tree; -@class Kdb3Tree; -@class Kdb4Entry; -@class UUID; -@class Binary; -@class BinaryRef; -@class StringField; -@class MPRootAdapter; +@class KPKGroup; +@class KPKEntry; +@class KPKTree; +@class KPKBinary; +@class KPKAttribute; @interface MPDocument : NSDocument @@ -42,24 +36,22 @@ APPKIT_EXTERN NSString *const MPDocumnetDidChangeCurrentEntryNotification; @property (assign, nonatomic) BOOL locked; @property (assign, readonly) BOOL decrypted; -@property (strong, readonly, nonatomic) KdbTree *tree; -@property (weak, readonly, nonatomic) KdbGroup *root; -@property (readonly, strong) MPRootAdapter *rootAdapter; -@property (weak, readonly) KdbGroup *trash; -@property (weak, readonly) KdbGroup *templates; +@property (strong, readonly, nonatomic) KPKTree *tree; +@property (weak, readonly, nonatomic) KPKGroup *root; +@property (weak, readonly) KPKGroup *trash; +@property (weak, readonly) KPKGroup *templates; @property (nonatomic, copy) NSString *password; @property (nonatomic, strong) NSURL *key; -@property (assign, readonly) MPDatabaseVersion version; @property (assign, readonly, getter = isReadOnly) BOOL readOnly; /* State (active group/entry) */ -@property (nonatomic, weak) KdbEntry *selectedEntry; -@property (nonatomic, weak) KdbGroup *selectedGroup; +@property (nonatomic, weak) KPKEntry *selectedEntry; +@property (nonatomic, weak) KPKGroup *selectedGroup; @property (nonatomic, weak) id selectedItem; @@ -73,14 +65,11 @@ APPKIT_EXTERN NSString *const MPDocumnetDidChangeCurrentEntryNotification; /* Returns the entry for the given UUID, nil if none was found */ -- (KdbEntry *)findEntry:(UUID *)uuid; -- (KdbGroup *)findGroup:(UUID *)uuid; +- (KPKEntry *)findEntry:(NSUUID *)uuid; +- (KPKGroup *)findGroup:(NSUUID *)uuid; -- (Kdb4Tree *)treeV4; -- (Kdb3Tree *)treeV3; - -- (void)useGroupAsTrash:(KdbGroup *)group; -- (void)useGroupAsTemplate:(KdbGroup *)group; +- (void)useGroupAsTrash:(KPKGroup *)group; +- (void)useGroupAsTemplate:(KPKGroup *)group; - (BOOL)isItemTrashed:(id)item; @@ -89,16 +78,12 @@ APPKIT_EXTERN NSString *const MPDocumnetDidChangeCurrentEntryNotification; #pragma mark Undo Data Manipulation /* Undoable Intiialization of elements */ -- (KdbGroup *)createGroup:(KdbGroup *)parent; -- (KdbEntry *)createEntry:(KdbGroup *)parent; -- (StringField *)createStringField:(KdbEntry *)entry; +- (KPKGroup *)createGroup:(KPKGroup *)parent; +- (KPKEntry *)createEntry:(KPKGroup *)parent; +- (KPKAttribute *)createCustomAttribute:(KPKEntry *)entry; -/* TODO in UNDO auslagen */ -- (void)addStringField:(StringField *)field toEntry:(Kdb4Entry *)entry atIndex:(NSUInteger)index; -- (void)removeStringField:(StringField *)field formEntry:(Kdb4Entry *)entry; - -- (void)deleteGroup:(KdbGroup *)group; -- (void)deleteEntry:(KdbEntry *)entry; +- (void)deleteGroup:(KPKGroup *)group; +- (void)deleteEntry:(KPKEntry *)entry; - (IBAction)emptyTrash:(id)sender; - (IBAction)createEntryFromTemplate:(id)sender; @@ -106,16 +91,6 @@ APPKIT_EXTERN NSString *const MPDocumnetDidChangeCurrentEntryNotification; @interface MPDocument (Attachments) -- (void)addAttachment:(NSURL *)location toEntry:(KdbEntry *)anEntry; -/** - item can be either a BinaryRef or an Kdb3Entry. - */ -- (void)saveAttachmentForItem:(id)item toLocation:(NSURL *)location; -- (NSData *)attachmentDataForItem:(id)item; -- (NSString *)attachmenFileNameForItem:(id)item; -- (void)removeAttachment:(BinaryRef *)reference fromEntry:(KdbEntry *)anEntry; -- (void)removeAttachmentFromEntry:(KdbEntry *)anEntry; -- (NSUInteger)nextBinaryId; -- (Binary *)findBinary:(BinaryRef *)reference; +- (void)addAttachment:(NSURL *)location toEntry:(KPKEntry *)anEntry; @end \ No newline at end of file diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 33e979af..1cb04d5d 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -9,36 +9,21 @@ #import "MPDocument.h" #import "MPDocumentWindowController.h" #import "MPDatabaseVersion.h" -#import "MPRootAdapter.h" #import "MPIconHelper.h" #import "MPActionHelper.h" #import "MPSettingsHelper.h" #import "MPNotifications.h" #import "MPSavePanelAccessoryViewController.h" -#import "KdbLib.h" -#import "Kdb3Node.h" -#import "Kdb4Node.h" -#import "Kdb4Persist.h" -#import "KdbPassword.h" - -#import "KdbGroup+KVOAdditions.h" -#import "Kdb4Entry+KVOAdditions.h" - -#import "KdbEntry+Undo.h" -#import "KdbGroup+Undo.h" - -#import "Kdb3Tree+NewTree.h" -#import "Kdb4Tree+NewTree.h" -#import "Kdb4Entry+MPAdditions.h" -#import "KdbGroup+MPTreeTools.h" -#import "KdbGroup+MPAdditions.h" - -#import "DataOutputStream.h" #import "DDXMLNode.h" +#import "KPKEntry.h" +#import "KPKGroup.h" +#import "KPKTree.h" #import "KPKTree+Serializing.h" #import "KPKPassword.h" +#import "KPKMetaData.h" +#import "KPKAttribute.h" NSString *const MPDocumentDidAddGroupNotification = @"com.hicknhack.macpass.MPDocumentDidAddGroupNotification"; NSString *const MPDocumentDidRevertNotifiation = @"com.hicknhack.macpass.MPDocumentDidRevertNotifiation"; @@ -54,15 +39,13 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { @interface MPDocument () { @private BOOL _didLockFile; - NSData *_fileData; + NSData *_encryptedData; } @property (strong, nonatomic) MPSavePanelAccessoryViewController *savePanelViewController; -@property (strong, nonatomic) KdbTree *tree; -@property (weak, nonatomic) KdbGroup *root; -@property (weak, nonatomic, readonly) KdbPassword *passwordHash; -@property (assign) MPDatabaseVersion version; +@property (strong, nonatomic) KPKTree *tree; +@property (weak, nonatomic) KPKGroup *root; @property (assign, nonatomic) BOOL hasPasswordOrKey; @property (assign) BOOL decrypted; @@ -90,27 +73,13 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { - (id)initWithVersion:(MPDatabaseVersion)version { self = [super init]; if(self) { - _fileData = nil; + _encryptedData = nil; _didLockFile = NO; _decrypted = YES; _hasPasswordOrKey = NO; _locked = NO; _readOnly = NO; - _rootAdapter = [[MPRootAdapter alloc] init]; - _version = version; - [[self undoManager] setLevelsOfUndo:10]; - switch(_version) { - case MPDatabaseVersion3: - self.tree = [Kdb3Tree templateTree]; - break; - case MPDatabaseVersion4: - self.tree = [Kdb4Tree templateTree]; - //self.tree = [Kdb4Tree demoTree]; - break; - default: - self = nil; - return nil; - } + self.tree = [KPKTree templateTree]; } return self; } @@ -133,10 +102,10 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { /* Move this to data:ofType: method with KeePassKit */ - NSError *error = nil; - [KdbWriterFactory persist:self.tree fileURL:url withPassword:self.passwordHash error:&error]; - if(error) { - NSLog(@"%@", [error localizedDescription]); + KPKPassword *password = nil; + NSData *treeData = [self.tree encryptWithPassword:password forVersion:KPKXmlVersion error:outError]; + if([treeData writeToURL:url options:NSDataWritingAtomic error:outError]) { + NSLog(@"%@", [*outError localizedDescription]); return NO; } return YES; @@ -158,7 +127,7 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { Delete our old Tree, and just grab the data */ self.tree = nil; - _fileData = [NSData dataWithContentsOfURL:url options:NSDataReadingUncached error:outError]; + _encryptedData = [NSData dataWithContentsOfURL:url options:NSDataReadingUncached error:outError]; self.decrypted = NO; return YES; } @@ -193,57 +162,42 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { } - (BOOL)prepareSavePanel:(NSSavePanel *)savePanel { - /* - - Save as different format doesn work without KeePassKit - hence disabled for now - if(!self.savePanelViewController) { self.savePanelViewController = [[MPSavePanelAccessoryViewController alloc] init]; } self.savePanelViewController.savePanel = savePanel; self.savePanelViewController.document = self; [savePanel setAccessoryView:[self.savePanelViewController view]]; - */ return YES; } - (void)writeXMLToURL:(NSURL *)url { - DataOutputStream *outputStream = [[DataOutputStream alloc] init]; - Kdb4Persist *persist = [[Kdb4Persist alloc] initWithTree:self.treeV4 outputStream:outputStream randomStream:nil]; - [persist persistWithOptions:DDXMLNodeCompactEmptyElement|DDXMLNodePrettyPrint]; - [outputStream.data writeToURL:url atomically:YES]; + NSData *xmlData = [self.tree xmlData]; + [xmlData writeToURL:url atomically:YES]; } #pragma mark Lock/Unlock/Decrypt - (BOOL)unlockWithPassword:(NSString *)password keyFileURL:(NSURL *)keyFileURL { - /* KPKPassword *passwordData = [[KPKPassword alloc] initWithPassword:password key:keyFileURL]; - KPKTree *tree = [[KPKTree alloc] initWithData:_fileData password:passwordData error:NULL]; - */ self.key = keyFileURL; self.password = [password length] > 0 ? password : nil; - @try { - self.tree = [KdbReaderFactory load:[[self fileURL] path] withPassword:self.passwordHash]; + NSError *error; + self.tree = [[KPKTree alloc] initWithData:_encryptedData password:passwordData error:&error]; + if(self.tree) { + self.decrypted = YES; + return YES; } - @catch (NSException *exception) { - return NO; - } - - if([self.tree isKindOfClass:[Kdb4Tree class]]) { - self.version = MPDatabaseVersion4; - } - else if( [self.tree isKindOfClass:[Kdb3Tree class]]) { - self.version = MPDatabaseVersion3; - } - self.decrypted = YES; - return YES; + self.decrypted = NO; + return NO; } - (void)lockDatabase:(id)sender { - // Persist Tree into data + KPKPassword *password = [[KPKPassword alloc] initWithPassword:self.password key:self.key]; + NSError *error; + /* Locking needs to be lossless hence just use the XML format */ + _encryptedData = [self.tree encryptWithPassword:password forVersion:KPKXmlVersion error:&error]; self.tree = nil; self.locked = YES; } @@ -263,18 +217,14 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { } } -- (KdbPassword *)passwordHash { - return [[KdbPassword alloc] initWithPassword:self.password passwordEncoding:NSUTF8StringEncoding keyFileURL:self.key]; -} - -- (void)setSelectedGroup:(KdbGroup *)selectedGroup { +- (void)setSelectedGroup:(KPKGroup *)selectedGroup { if(_selectedGroup != selectedGroup) { _selectedGroup = selectedGroup; } self.selectedItem = _selectedGroup; } -- (void)setSelectedEntry:(KdbEntry *)selectedEntry { +- (void)setSelectedEntry:(KPKEntry *)selectedEntry { if(_selectedEntry != selectedEntry) { _selectedEntry = selectedEntry; } @@ -289,85 +239,52 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { } #pragma mark Data Accesors -- (void)setTree:(KdbTree *)tree { +- (void)setTree:(KPKTree *)tree { if(_tree != tree) { _tree = tree; - self.rootAdapter.tree = _tree; + _tree.undoManager = [self undoManager]; } } -- (KdbGroup *)root { +- (KPKGroup *)root { return self.tree.root; } -- (KdbEntry *)findEntry:(UUID *)uuid { +- (KPKEntry *)findEntry:(NSUUID *)uuid { return [self.root entryForUUID:uuid]; } -- (KdbGroup *)findGroup:(UUID *)uuid { +- (KPKGroup *)findGroup:(NSUUID *)uuid { return [self.root groupForUUID:uuid]; } -- (Kdb3Tree *)treeV3 { - switch (_version) { - case MPDatabaseVersion3: - NSAssert(self.tree == nil || [self.tree isKindOfClass:[Kdb3Tree class]], @"Tree has to be Version3"); - return (Kdb3Tree *)self.tree; - case MPDatabaseVersion4: - return nil; - default: - return nil; - } -} - -- (Kdb4Tree *)treeV4 { - switch (_version) { - case MPDatabaseVersion3: - return nil; - case MPDatabaseVersion4: - NSAssert(self.tree == nil || [self.tree isKindOfClass:[Kdb4Tree class]], @"Tree has to be Version4"); - return (Kdb4Tree *)self.tree; - default: - return nil; - } -} - - (BOOL)useTrash { - if(self.treeV4) { - return self.treeV4.recycleBinEnabled; - } - return NO; + return self.tree.metaData.recycleBinEnabled; } -- (KdbGroup *)trash { - static KdbGroup *_trash = nil; +- (KPKGroup *)trash { + static KPKGroup *_trash = nil; if(self.useTrash) { - BOOL trashValid = [((Kdb4Group *)_trash).uuid isEqual:self.treeV4.recycleBinUuid]; + BOOL trashValid = [_trash.uuid isEqual:self.tree.metaData.recycleBinUuid]; if(!trashValid) { - _trash = [self findGroup:self.treeV4.recycleBinUuid]; + _trash = [self findGroup:self.tree.metaData.recycleBinUuid]; } return _trash; } return nil; } -- (KdbGroup *)templates { - static KdbGroup *_templates = nil; - if(self.version == MPDatabaseVersion3) { - return nil; - } - BOOL templateValid = [((Kdb4Group *)_templates).uuid isEqual:self.treeV4.entryTemplatesGroup]; +- (KPKGroup *)templates { + static KPKGroup *_templates = nil; + BOOL templateValid = [_templates.uuid isEqual:self.tree.metaData.entryTemplatesGroup]; if(!templateValid) { - _templates = [self findGroup:self.treeV4.entryTemplatesGroup]; + _templates = [self findGroup:self.tree.metaData.entryTemplatesGroup]; } return _templates; } - (BOOL)isItemTrashed:(id)item { - if(self.version == MPDatabaseVersion3) { - return NO; - } - BOOL validItem = [item isKindOfClass:[KdbEntry class]] || [item isKindOfClass:[KdbGroup class]]; + BOOL validItem = [item isKindOfClass:[KPKEntry class]] || [item isKindOfClass:[KPKGroup class]]; if(!item) { return NO; } @@ -386,27 +303,22 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { return NO; } -- (void)useGroupAsTrash:(KdbGroup *)group { +- (void)useGroupAsTrash:(KPKGroup *)group { if(self.useTrash) { - Kdb4Group *groupv4 = (Kdb4Group *)group; - if(![self.treeV4.recycleBinUuid isEqual:groupv4.uuid]) { - self.treeV4.recycleBinUuid = groupv4.uuid; + if(![self.tree.metaData.recycleBinUuid isEqual:group.uuid]) { + self.tree.metaData.recycleBinUuid = group.uuid; } } } -- (void)useGroupAsTemplate:(KdbGroup *)group { - if(self.version != MPDatabaseVersion4) { - return; // wrong database version - } - Kdb4Group *groupv4 = (Kdb4Group *)group; - if(![self.treeV4.entryTemplatesGroup isEqual:groupv4.uuid]) { - self.treeV4.entryTemplatesGroup = groupv4.uuid; +- (void)useGroupAsTemplate:(KPKGroup *)group { + if(![self.tree.metaData.entryTemplatesGroup isEqual:group.uuid]) { + self.tree.metaData.entryTemplatesGroup = group.uuid; } } #pragma mark Data manipulation -- (KdbEntry *)createEntry:(KdbGroup *)parent { +- (KPKEntry *)createEntry:(KPKGroup *)parent { if(!parent) { return nil; // No parent } @@ -416,16 +328,16 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { if([self isItemTrashed:parent]) { return nil; } - KdbEntry *newEntry = [self.tree createEntry:parent]; + KPKEntry *newEntry = [self.tree createEntry:parent]; newEntry.title = NSLocalizedString(@"DEFAULT_ENTRY_TITLE", @"Title for a newly created entry"); - if(self.treeV4 && ([self.treeV4.defaultUserName length] > 0)) { - newEntry.title = self.treeV4.defaultUserName; + if([self.tree.metaData.defaultUserName length] > 0) { + newEntry.title = self.tree.metaData.defaultUserName; } - [parent addEntryUndoable:newEntry atIndex:[parent.entries count]]; + [parent addEntry:newEntry]; return newEntry; } -- (KdbGroup *)createGroup:(KdbGroup *)parent { +- (KPKGroup *)createGroup:(KPKGroup *)parent { if(!parent) { return nil; // no parent! } @@ -435,29 +347,25 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { if([self isItemTrashed:parent]) { return nil; } - KdbGroup *newGroup = [self.tree createGroup:parent]; + KPKGroup *newGroup = [self.tree createGroup:parent]; newGroup.name = NSLocalizedString(@"DEFAULT_GROUP_NAME", @"Title for a newly created group"); - newGroup.image = MPIconFolder; - [parent addGroupUndoable:newGroup atIndex:[parent.groups count]]; + newGroup.icon = MPIconFolder; + [parent addGroup:newGroup]; NSDictionary *userInfo = @{ MPDocumentGroupKey : newGroup }; [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:userInfo]; return newGroup; } -- (StringField *)createStringField:(KdbEntry *)entry { - if(![entry isKindOfClass:[Kdb4Entry class]]) { - return nil; - } - Kdb4Entry *entryV4 = (Kdb4Entry *)entry; +- (KPKAttribute *)createCustomAttribute:(KPKEntry *)entry { NSString *title = NSLocalizedString(@"DEFAULT_CUSTOM_FIELD_TITLE", @"Default Titel for new Custom-Fields"); NSString *value = NSLocalizedString(@"DEFAULT_CUSTOM_FIELD_VALUE", @"Default Value for new Custom-Fields"); - title = [entryV4 uniqueKeyForProposal:title]; - StringField *newStringField = [StringField stringFieldWithKey:title andValue:value]; - [self addStringField:newStringField toEntry:entryV4 atIndex:[entryV4.stringFields count]]; - return newStringField; + title = [entry proposedKeyForAttributeKey:title]; + KPKAttribute *newAttribute = [[KPKAttribute alloc] initWithKey:title value:value]; + [entry addCustomAttribute:newAttribute]; + return newAttribute; } -- (void)deleteEntry:(KdbEntry *)entry { +- (void)deleteEntry:(KPKEntry *)entry { if(self.useTrash) { if(!self.trash) { [self _createTrashGroup]; @@ -465,15 +373,17 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { if([self isItemTrashed:entry]) { return; // Entry is already trashed } - [entry moveToTrashUndoable:self.trash atIndex:[self.trash.entries count]]; + [entry moveToGroup:self.trash atIndex:[self.trash.entries count]]; + [[self undoManager] setActionName:NSLocalizedString(@"TRASH_ENTRY", "Move Entry to Trash")]; } else { - [entry deleteUndoable]; + [entry remove]; + [[self undoManager] setActionName:NSLocalizedString(@"DELETE_ENTRY", "")]; } self.selectedEntry = nil; } -- (void)deleteGroup:(KdbGroup *)group { +- (void)deleteGroup:(KPKGroup *)group { if(self.useTrash) { if(!self.trash) { [self _createTrashGroup]; @@ -481,38 +391,18 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { if( (group == self.trash) || [self isItemTrashed:group] ) { return; //Groups already trashed cannot be deleted } - [group moveToTrashUndoable:self.trash atIndex:[self.trash.groups count]]; + [group moveToGroup:self.trash atIndex:[self.trash.groups count]]; + [[self undoManager] setActionName:NSLocalizedString(@"TRASH_GROUP", "Move Group to Trash")]; } else { - [group deleteUndoable]; + [group remove]; + [[self undoManager] setActionName:NSLocalizedString(@"DELETE_GROUP", "Delete Group")]; } } -#pragma mark CustomFields -- (void)addStringField:(StringField *)field toEntry:(Kdb4Entry *)entry atIndex:(NSUInteger)index { - [[[self undoManager] prepareWithInvocationTarget:self] removeStringField:field formEntry:entry]; - [[self undoManager] setActionName:NSLocalizedString(@"UNDO_ADD_STRING_FIELD", @"Add Stringfield Undo")]; - field.entry = entry; - [entry insertObject:field inStringFieldsAtIndex:index]; -} - -- (void)removeStringField:(StringField *)field formEntry:(Kdb4Entry *)entry { - NSInteger index = [entry.stringFields indexOfObject:field]; - if(NSNotFound == index) { - return; // Nothing found to be removed - } - [[[self undoManager] prepareWithInvocationTarget:self] addStringField:field toEntry:entry atIndex:index]; - [[self undoManager] setActionName:NSLocalizedString(@"UNDO_DELETE_STRING_FIELD", @"Delte Stringfield undo")]; - field.entry = nil; - [entry removeObjectFromStringFieldsAtIndex:index]; -} - #pragma mark Actions - (void)emptyTrash:(id)sender { - if(self.version != MPDatabaseVersion4) { - return; // We have no trash on those file types - } NSAlert *alert = [[NSAlert alloc] init]; [alert setAlertStyle:NSWarningAlertStyle]; [alert setMessageText:NSLocalizedString(@"WARNING_ON_EMPTY_TRASH_TITLE", "")]; @@ -534,7 +424,7 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { - (void)createEntryFromTemplate:(id)sender { NSMenuItem *item = sender; - KdbEntry *entry = [item representedObject]; + KPKEntry *entry = [item representedObject]; if(entry) { // Create Entry from template; } @@ -565,50 +455,32 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { } } -- (KdbGroup *)_createTrashGroup { +- (KPKGroup *)_createTrashGroup { /* Maybe push the stuff to the Tree? */ - if(self.version == MPDatabaseVersion3) { - return nil; + KPKGroup *trash = [self.tree createGroup:self.tree.root]; + trash.name = NSLocalizedString(@"TRASH", @"Name for the trash group"); + trash.icon = MPIconTrash; + BOOL registrationEnable = [[self undoManager] isUndoRegistrationEnabled]; + if(registrationEnable) { + [[self undoManager] disableUndoRegistration]; } - else if(self.version == MPDatabaseVersion4) { - KdbGroup *trash = [self.tree createGroup:self.tree.root]; - trash.name = NSLocalizedString(@"TRASH", @"Name for the trash group"); - trash.image = MPIconTrash; - [self.tree.root insertObject:trash inGroupsAtIndex:[self.tree.root.groups count]]; - self.treeV4.recycleBinUuid = ((Kdb4Group *)trash).uuid; - return trash; - } - else { - NSAssert(NO, @"Database with unknown version: %ld", _version); - return nil; + [self.tree.root addGroup:trash]; + if(registrationEnable) { + [[self undoManager] enableUndoRegistration]; } + + self.tree.metaData.recycleBinUuid = trash.uuid; + return trash; } - (void)_emptyTrash { - for(KdbEntry *entry in [self.trash childEntries]) { + for(KPKEntry *entry in [self.trash childEntries]) { [[self undoManager] removeAllActionsWithTarget:entry]; } - for(KdbGroup *group in [self.trash childGroups]) { + for(KPKGroup *group in [self.trash childGroups]) { [[self undoManager] removeAllActionsWithTarget:group]; } - [self _cleanTrashedBinaries]; [self.trash clear]; } -- (void)_cleanTrashedBinaries { - NSMutableSet *clearKeys = [[NSMutableSet alloc] initWithCapacity:20]; - NSMutableArray *clearBinaries = [[NSMutableArray alloc] initWithCapacity:[self.treeV4.binaries count]]; - for(Kdb4Entry *entry in [self.trash childEntries]) { - for(BinaryRef *binaryRef in entry.binaries) { - [clearKeys addObject:@(binaryRef.ref)]; - } - } - for(Binary *binary in self.treeV4.binaries) { - if([clearKeys containsObject:@(binary.binaryId)]) { - [clearBinaries addObject:binary]; - } - } - [self.treeV4.binaries removeObjectsInArray:clearBinaries]; -} - @end diff --git a/MacPass/MPDocumentQueryService.h b/MacPass/MPDocumentQueryService.h index c94e4910..18450ca5 100644 --- a/MacPass/MPDocumentQueryService.h +++ b/MacPass/MPDocumentQueryService.h @@ -8,13 +8,13 @@ #import -@class KdbEntry; +@class KPKEntry; @interface MPDocumentQueryService : NSObject + (MPDocumentQueryService *)defaultService; -- (KdbEntry *)configurationEntry; -- (KdbEntry *)createConfigurationEntry; +- (KPKEntry *)configurationEntry; +- (KPKEntry *)createConfigurationEntry; @end diff --git a/MacPass/MPDocumentQueryService.m b/MacPass/MPDocumentQueryService.m index a8df778e..55b3c2db 100644 --- a/MacPass/MPDocumentQueryService.m +++ b/MacPass/MPDocumentQueryService.m @@ -8,11 +8,12 @@ #import "MPDocumentQueryService.h" #import "MPDocument.h" -#import "UUID.h" + +#import "NSUUID+KeePassKit.h" @interface MPDocumentQueryService () { @private - UUID *rootUuid; + NSUUID *rootUuid; } @end @@ -36,20 +37,20 @@ 0x9f, 0x36, 0x89, 0x7d, 0x62, 0x3e, 0xcb, 0x31 }; NSData *data = [NSData dataWithBytes:uuidBytes length:16]; - rootUuid = [[UUID alloc] initWithData:data]; + rootUuid = [[NSUUID alloc] initWithData:data]; } return self; } -- (KdbEntry *)configurationEntry { +- (KPKEntry *)configurationEntry { /* We are looking in all document, but only store the key in one. */ NSArray *documents = [[NSDocumentController sharedDocumentController] documents]; for(MPDocument *document in documents) { - KdbEntry *entry = [document findEntry:rootUuid]; + KPKEntry *entry = [document findEntry:rootUuid]; if(entry) { return entry; } @@ -57,7 +58,7 @@ return nil; } -- (KdbEntry *)createConfigurationEntry { +- (KPKEntry *)createConfigurationEntry { return nil; } diff --git a/MacPass/MPDocumentWindowController.h b/MacPass/MPDocumentWindowController.h index 45a6fc29..d53c9c68 100644 --- a/MacPass/MPDocumentWindowController.h +++ b/MacPass/MPDocumentWindowController.h @@ -14,9 +14,6 @@ @class MPPasswordInputController; @class MPOutlineViewController; -@class KdbGroup; -@class KdbEntry; - @interface MPDocumentWindowController : NSWindowController @property (readonly, strong) MPPasswordInputController *passwordInputController; diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index e28733f3..4fd1feba 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -184,9 +184,6 @@ } BOOL enabled = YES; - if(itemAction == @selector(exportDatabase:)) { - enabled = (nil != document.treeV4); - } if(itemAction == [MPActionHelper actionOfType:MPActionDelete]) { enabled &= (nil != document.selectedItem) && (document.selectedItem != document.trash); } diff --git a/MacPass/MPDocumentWindowDelegate.m b/MacPass/MPDocumentWindowDelegate.m index fcf7deda..aa6a2001 100644 --- a/MacPass/MPDocumentWindowDelegate.m +++ b/MacPass/MPDocumentWindowDelegate.m @@ -8,8 +8,8 @@ #import "MPDocumentWindowDelegate.h" #import "MPDocument.h" -#import "Kdb.h" -#import "KdbEntry+Undo.h" + +#import "KPKEntry.h" @implementation MPDocumentWindowDelegate @@ -55,9 +55,9 @@ BOOL ok = NO; if(document.selectedGroup) { [[document undoManager] beginUndoGrouping]; - KdbEntry *entry = [document createEntry:document.selectedGroup]; + KPKEntry *entry = [document createEntry:document.selectedGroup]; ok = (nil != entry); - entry.urlUndoable = [url absoluteString]; + entry.url = [url absoluteString]; [[document undoManager] endUndoGrouping]; [[document undoManager] setActionName:NSLocalizedString(@"IMPORT_URL", @"Imports a dragged URL for a new entry")]; } diff --git a/MacPass/MPEntryContextMenuDelegate.m b/MacPass/MPEntryContextMenuDelegate.m index ba0bd801..309c1036 100644 --- a/MacPass/MPEntryContextMenuDelegate.m +++ b/MacPass/MPEntryContextMenuDelegate.m @@ -9,7 +9,8 @@ #import "MPEntryContextMenuDelegate.h" #import "MPDocument.h" -#import "Kdb4Node.h" +#import "KPKEntry.h" +#import "KPKAttribute.h" static NSUInteger const kMPCustomFieldMenuItem = 1000; static NSUInteger const kMPAttachmentsMenuItem = 2000; @@ -25,29 +26,28 @@ static NSUInteger const kMPAttachmentsMenuItem = 2000; if(attachmentsMenu) { [menu removeItem:attachmentsMenu]; } - + NSMenuItem *lastItem = [[menu itemArray] lastObject]; if([lastItem isSeparatorItem]) { [menu removeItem:lastItem]; } MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument]; - if([document.selectedEntry isKindOfClass:[Kdb4Entry class]]) { - Kdb4Entry *entry = (Kdb4Entry *)document.selectedEntry; - if([entry.stringFields count] > 0) { - [menu addItem:[NSMenuItem separatorItem]]; - NSMenuItem *customFieldsItem = [[NSMenuItem alloc] init]; - NSMenu *submenu = [[NSMenu alloc] initWithTitle:@"Fields"]; - [customFieldsItem setTitle:NSLocalizedString(@"COPY_CUSTOM_FIELDS", "Submenu to Copy custom fields")]; - [customFieldsItem setTag:kMPCustomFieldMenuItem]; - for (StringField *field in entry.stringFields) { - NSString *title = [NSString stringWithFormat:NSLocalizedString(@"COPY_FIELD_%@", "Mask for title to copy field value"), field.key]; - NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:title action:@selector(copyCustomField:) keyEquivalent:@""]; - [item setTag:[entry.stringFields indexOfObject:field]]; - [submenu addItem:item]; - } - [customFieldsItem setSubmenu:submenu]; - [menu addItem:customFieldsItem]; + + KPKEntry *entry = document.selectedEntry; + if([entry.customAttributes count] > 0) { + [menu addItem:[NSMenuItem separatorItem]]; + NSMenuItem *attributeItem = [[NSMenuItem alloc] init]; + NSMenu *submenu = [[NSMenu alloc] initWithTitle:@"Fields"]; + [attributeItem setTitle:NSLocalizedString(@"COPY_CUSTOM_FIELDS", "Submenu to Copy custom fields")]; + [attributeItem setTag:kMPCustomFieldMenuItem]; + for (KPKAttribute *attribute in entry.customAttributes) { + NSString *title = [NSString stringWithFormat:NSLocalizedString(@"COPY_FIELD_%@", "Mask for title to copy field value"), attribute.key]; + NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:title action:@selector(copyCustomAttribute:) keyEquivalent:@""]; + [item setTag:[entry.customAttributes indexOfObject:attribute]]; + [submenu addItem:item]; } + [attributeItem setSubmenu:submenu]; + [menu addItem:attributeItem]; } } diff --git a/MacPass/MPEntryInspectorViewController.h b/MacPass/MPEntryInspectorViewController.h index caf01cc6..041f5f83 100644 --- a/MacPass/MPEntryInspectorViewController.h +++ b/MacPass/MPEntryInspectorViewController.h @@ -8,7 +8,6 @@ #import "MPViewController.h" -@class KdbEntry; @class HNHRoundedSecureTextField; @class MPDocument; diff --git a/MacPass/MPEntryInspectorViewController.m b/MacPass/MPEntryInspectorViewController.m index 9e6921b8..ee5d85a9 100644 --- a/MacPass/MPEntryInspectorViewController.m +++ b/MacPass/MPEntryInspectorViewController.m @@ -15,10 +15,8 @@ #import "MPDocument.h" #import "MPIconHelper.h" -#import "Kdb.h" -#import "Kdb3Node.h" -#import "Kdb4Node.h" -#import "KdbEntry+Undo.h" +#import "KPKEntry.h" +#import "KPKBinary.h" #import "HNHScrollView.h" #import "HNHRoundedSecureTextField.h" @@ -43,7 +41,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { @property (nonatomic, assign) MPEntryTab activeTab; @property (strong) NSPopover *activePopover; -@property (nonatomic, weak) KdbEntry *entry; +@property (nonatomic, weak) KPKEntry *entry; @end @@ -54,23 +52,23 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { } - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - _showPassword = NO; - _attachmentsController = [[NSArrayController alloc] init]; - _customFieldsController = [[NSArrayController alloc] init]; - _attachmentTableDelegate = [[MPAttachmentTableViewDelegate alloc] init]; - _customFieldTableDelegate = [[MPCustomFieldTableViewDelegate alloc] init]; - _attachmentDataSource = [[MPAttachmentTableDataSource alloc] init]; - _attachmentTableDelegate.viewController = self; - _customFieldTableDelegate.viewController = self; - _activeTab = MPEntryTabGeneral; - } - return self; + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + _showPassword = NO; + _attachmentsController = [[NSArrayController alloc] init]; + _customFieldsController = [[NSArrayController alloc] init]; + _attachmentTableDelegate = [[MPAttachmentTableViewDelegate alloc] init]; + _customFieldTableDelegate = [[MPCustomFieldTableViewDelegate alloc] init]; + _attachmentDataSource = [[MPAttachmentTableDataSource alloc] init]; + _attachmentTableDelegate.viewController = self; + _customFieldTableDelegate.viewController = self; + _activeTab = MPEntryTabGeneral; + } + return self; } - (void)didLoadView { - + /* ScrollView setup for the General Tab */ HNHScrollView *scrollView = [[HNHScrollView alloc] init]; @@ -117,7 +115,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { [_customFieldsTableView setBackgroundColor:[NSColor clearColor]]; [_customFieldsTableView bind:NSContentBinding toObject:_customFieldsController withKeyPath:@"arrangedObjects" options:nil]; [_customFieldsTableView setDelegate:_customFieldTableDelegate]; - + [self.passwordTextField bind:@"showPassword" toObject:self withKeyPath:@"showPassword" options:nil]; [self.togglePassword bind:NSValueBinding toObject:self withKeyPath:@"showPassword" options:nil]; @@ -127,7 +125,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { [self bind:@"entry" toObject:document withKeyPath:@"selectedEntry" options:nil]; } -- (void)setEntry:(KdbEntry *)entry { +- (void)setEntry:(KPKEntry *)entry { if(_entry != entry) { _entry = entry; [self _updateContent]; @@ -139,36 +137,23 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { - (IBAction)addCustomField:(id)sender { MPDocument *document = [[self windowController] document]; - [document createStringField:self.entry]; + [document createCustomAttribute:self.entry]; } - (IBAction)removeCustomField:(id)sender { - MPDocument *document = [[self windowController] document]; NSUInteger index = [sender tag]; - Kdb4Entry *entry = (Kdb4Entry *)self.entry; - [document removeStringField:(entry.stringFields)[index] formEntry:entry]; + KPKAttribute *attribute = self.entry.customAttributes[index]; + [self.entry removeCustomAttribute:attribute]; } - (IBAction)saveAttachment:(id)sender { - BOOL isVersion4 = [self.entry isKindOfClass:[Kdb4Entry class]]; - id item = self.entry; - NSString *fileName = nil; - if(isVersion4) { - Kdb4Entry *entry= (Kdb4Entry *)self.entry; - item = entry.binaries[[sender tag]]; - fileName = ((BinaryRef *)item).key; - } - else { - fileName = ((Kdb3Entry *)item).binaryDesc; - } - + KPKBinary *binary = self.entry.binaries[[sender tag]]; NSSavePanel *savePanel = [NSSavePanel savePanel]; [savePanel setCanCreateDirectories:YES]; - [savePanel setNameFieldStringValue:fileName]; + [savePanel setNameFieldStringValue:binary.name]; [savePanel beginSheetModalForWindow:[[self windowController] window] completionHandler:^(NSInteger result) { if(result == NSFileHandlingPanelOKButton) { - MPDocument *document = [[self windowController] document]; - [document saveAttachmentForItem:item toLocation:[savePanel URL]]; + [binary saveToLocation:[savePanel URL]]; } }]; } @@ -180,24 +165,17 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { [openPanel setAllowsMultipleSelection:YES]; [openPanel beginSheetModalForWindow:[[self windowController] window] completionHandler:^(NSInteger result) { if(result == NSFileHandlingPanelOKButton) { - MPDocument *document = [[self windowController] document]; for (NSURL *attachmentURL in [openPanel URLs]) { - [document addAttachment:attachmentURL toEntry:self.entry]; + KPKBinary *binary = [[KPKBinary alloc] initWithContentsOfURL:attachmentURL]; + [self.entry addBinary:binary]; } } }]; } - (IBAction)removeAttachment:(id)sender { - MPDocument *document = [[self windowController] document]; - if(document.version == MPDatabaseVersion3) { - [document removeAttachmentFromEntry:self.entry]; - } - else if(document.version == MPDatabaseVersion4) { - Kdb4Entry *entry = (Kdb4Entry *)self.entry; - BinaryRef *reference = entry.binaries[[sender tag]]; - [document removeAttachment:reference fromEntry:self.entry]; - } + KPKBinary *binary = self.entry.binaries[[sender tag]]; + [self.entry removeBinary:binary]; } #pragma mark - @@ -230,7 +208,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { NSString *password = [controller generatedPassword]; /* We should only use the password if there is actally one */ if([password length] > 0) { - self.entry.passwordUndoable = [controller generatedPassword]; + self.entry.password = [controller generatedPassword]; } } /* TODO: Check for Icon wizzard */ @@ -249,15 +227,12 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { - (void)_bindEntry { if(self.entry) { - [self.titleTextField bind:NSValueBinding toObject:self.entry withKeyPath:@"titleUndoable" options:nil]; + [self.titleTextField bind:NSValueBinding toObject:self.entry withKeyPath:@"title" options:nil]; //[self.itemImageView setImage:[MPIconHelper icon:(MPIconType)self.entry.image ]]; - [self.passwordTextField bind:NSValueBinding toObject:self.entry withKeyPath:@"passwordUndoable" options:nil]; - [self.usernameTextField bind:NSValueBinding toObject:self.entry withKeyPath:@"usernameUndoable" options:nil]; - [self.URLTextField bind:NSValueBinding toObject:self.entry withKeyPath:@"urlUndoable" options:nil]; - [self.notesTextView bind:NSValueBinding toObject:self.entry withKeyPath:@"notesUndoable" options:nil]; - - BOOL isKdbx = [self.entry isKindOfClass:[Kdb4Entry class]]; - [self.infoTabControl setEnabled:isKdbx forSegment:MPEntryTabCustomFields]; + [self.passwordTextField bind:NSValueBinding toObject:self.entry withKeyPath:@"password" options:nil]; + [self.usernameTextField bind:NSValueBinding toObject:self.entry withKeyPath:@"username" options:nil]; + [self.URLTextField bind:NSValueBinding toObject:self.entry withKeyPath:@"url" options:nil]; + [self.notesTextView bind:NSValueBinding toObject:self.entry withKeyPath:@"notes" options:nil]; } else { [self.titleTextField unbind:NSValueBinding]; @@ -279,13 +254,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { } - (void)_bindCustomFields { - if(self.entry && [self.entry isKindOfClass:[Kdb4Entry class]]) { - [_customFieldsController bind:NSContentArrayBinding toObject:self.entry withKeyPath:@"stringFields" options:nil]; - } - else if([_customFieldsController content] != nil){ - [_customFieldsController unbind:NSContentArrayBinding]; - [_customFieldsController setContent:nil]; - } + [_customFieldsController bind:NSContentArrayBinding toObject:self.entry withKeyPath:@"customAttributes" options:nil]; } @end diff --git a/MacPass/MPEntryTableDataSource.m b/MacPass/MPEntryTableDataSource.m index 15efca88..501e52be 100644 --- a/MacPass/MPEntryTableDataSource.m +++ b/MacPass/MPEntryTableDataSource.m @@ -9,10 +9,8 @@ #import "MPEntryTableDataSource.h" #import "MPEntryViewController.h" -#import "Kdb.h" -#import "UUID+Pasterboard.h" - -#import "MPConstants.h" +#import "KPKEntry.h" +#import "NSUUID+KeePassKit.h" @interface MPEntryTableDataSource () @@ -27,10 +25,10 @@ } id item = [self.viewController.entryArrayController arrangedObjects][[rowIndexes firstIndex]]; - if(![item isKindOfClass:[KdbEntry class]]) { + if(![item isKindOfClass:[KPKEntry class]]) { return NO; } - KdbEntry *entry = (KdbEntry *)item; + KPKEntry *entry = (KPKEntry *)item; [pboard writeObjects:@[entry.uuid]]; return YES; } diff --git a/MacPass/MPEntryViewController.h b/MacPass/MPEntryViewController.h index 102d22d1..c7afc9d6 100644 --- a/MacPass/MPEntryViewController.h +++ b/MacPass/MPEntryViewController.h @@ -22,14 +22,13 @@ typedef NS_ENUM( NSUInteger, MPCopyContentTypeTag) { MPCopyWholeEntry, }; -@class KdbGroup; -@class KdbEntry; +@class KPKEntry; @class MPOutlineViewDelegate; @class MPDocumentWindowController; @interface MPEntryViewController : MPViewController -@property (readonly, weak, nonatomic) KdbEntry *selectedEntry; +@property (readonly, weak, nonatomic) KPKEntry *selectedEntry; @property (weak,readonly) NSTableView *entryTable; @property (readonly, strong) NSArrayController *entryArrayController; @@ -46,7 +45,7 @@ typedef NS_ENUM( NSUInteger, MPCopyContentTypeTag) { /* Copy/Paste */ - (void)copyUsername:(id)sender; - (void)copyPassword:(id)sender; -- (void)copyCustomField:(id)sender; +- (void)copyCustomAttribute:(id)sender; - (void)copyURL:(id)sender; - (void)openURL:(id)sender; diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index a38f7a99..2f2bc6ce 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -24,14 +24,15 @@ #import "MPStripLineBreaksTransformer.h" #import "MPEntryContextMenuDelegate.h" +#import "KPKUTIs.h" +#import "KPKGroup.h" +#import "KPKEntry.h" +#import "KPKNode+IconImage.h" +#import "KPKAttribute.h" + #import "HNHTableHeaderCell.h" #import "HNHGradientView.h" -#import "Kdb4Node.h" -#import "KdbGroup+MPTreeTools.h" -#import "KdbGroup+Undo.h" -#import "KdbEntry+Undo.h" - #import "MPNotifications.h" #define STATUS_BAR_ANIMATION_TIME 0.15 @@ -90,7 +91,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; @property (weak) IBOutlet NSTextField *entryCountTextField; -@property (weak) KdbEntry *selectedEntry; +@property (weak) KPKEntry *selectedEntry; @property (nonatomic, strong) MPEntryTableDataSource *dataSource; @@ -139,7 +140,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [self.entryTable setDoubleAction:@selector(_columnDoubleClick:)]; [self.entryTable setTarget:self]; [self.entryTable setFloatsGroupRows:NO]; - [self.entryTable registerForDraggedTypes:@[MPEntryUTI]]; + [self.entryTable registerForDraggedTypes:@[KPKEntryUTI]]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didBecomFirstResponder:) name:MPDidActivateViewNotification @@ -209,7 +210,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; #pragma mark NSTableViewDelgate - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { - KdbEntry *entry = [self.entryArrayController arrangedObjects][row]; + KPKEntry *entry = [self.entryArrayController arrangedObjects][row]; BOOL isTitleColumn = [[tableColumn identifier] isEqualToString:MPEntryTableTitleColumnIdentifier]; BOOL isGroupColumn = [[tableColumn identifier] isEqualToString:MPEntryTableParentColumnIdentifier]; BOOL isPasswordColum = [[tableColumn identifier] isEqualToString:MPEntryTablePasswordColumnIdentifier]; @@ -223,31 +224,31 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; if(isTitleColumn || isGroupColumn) { view = [tableView makeViewWithIdentifier:_MPTableImageCellView owner:self]; if( isTitleColumn ) { - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"titleUndoable" options:nil]; - [[view imageView] setImage:[MPIconHelper icon:(MPIconType)entry.image]]; + [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"title" options:nil]; + [[view imageView] setImage:entry.iconImage]; } else { assert(entry.parent); - [[view textField] bind:NSValueBinding toObject:entry.parent withKeyPath:MPGroupNameUndoableKey options:nil]; - [[view imageView] setImage:[MPIconHelper icon:(MPIconType)entry.parent.image]]; + [[view textField] bind:NSValueBinding toObject:entry.parent withKeyPath:entry.parent.name options:nil]; + [[view imageView] setImage:entry.iconImage]; } } else if( isPasswordColum ) { view = [tableView makeViewWithIdentifier:_MPTAbleSecurCellView owner:self]; NSDictionary *options = @{ NSValueTransformerBindingOption : [NSValueTransformer valueTransformerForName:MPStringLengthValueTransformerName] }; - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"passwordUndoable" options:options]; + [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"password" options:options]; } else { view = [tableView makeViewWithIdentifier:_MPTableStringCellView owner:self]; if(isURLColumn) { - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"urlUndoable" options:nil]; + [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"url" options:nil]; } else if( isUsernameColumn) { - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"usernameUndoable" options:nil]; + [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"username" options:nil]; } else if( isNotesColumn ) { NSDictionary *options = @{ NSValueTransformerNameBindingOption : MPStripLineBreaksTransformerName }; - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"notesUndoable" options:options]; + [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"notes" options:options]; } else if( isAttachmentColumn ) { [[view textField] setStringValue:@""]; @@ -258,7 +259,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; [formatter setDateStyle:NSDateFormatterMediumStyle]; [formatter setTimeStyle:NSDateFormatterMediumStyle]; [[view textField] setFormatter:formatter]; - [[view textField] bind:NSValueBinding toObject:entry withKeyPath:@"lastModificationTime" options:nil]; + [[view textField] bind:NSValueBinding toObject:entry.timeInfo withKeyPath:@"lastModificationTime" options:nil]; } } @@ -292,13 +293,13 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; If we reselct the group, or just another group we clear the filter and bind to the new selected group */ - if([self _showsFilterBar] && ![document.selectedItem isKindOfClass:[KdbEntry class]]) { + if([self _showsFilterBar] && ![document.selectedItem isKindOfClass:[KPKEntry class]]) { [self clearFilter:nil]; [self.entryArrayController bind:NSContentArrayBinding toObject:document.selectedGroup withKeyPath:@"entries" options:nil]; return; } if([[self.entryArrayController content] count] > 0) { - KdbEntry *entry = [[self.entryArrayController content] lastObject]; + KPKEntry *entry = [[self.entryArrayController content] lastObject]; if(entry.parent == document.selectedGroup) { return; // we are showing the correct object right now. } @@ -593,9 +594,9 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; } -#pragma makr Action Helper +#pragma mark Action Helper -- (KdbEntry *)_clickedOrSelectedEntry { +- (KPKEntry *)_clickedOrSelectedEntry { NSInteger activeRow = [self.entryTable clickedRow]; /* Fallback to selection e.g. for toolbar actions */ if(activeRow < 0 ) { @@ -610,39 +611,38 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; #pragma mark Actions - (void)copyPassword:(id)sender { - KdbEntry *selectedEntry = [self _clickedOrSelectedEntry]; + KPKEntry *selectedEntry = [self _clickedOrSelectedEntry]; if(selectedEntry) { [self _copyToPasteboard:selectedEntry.password overlayInfo:MPOverlayInfoPassword name:nil]; } } - (void)copyUsername:(id)sender { - KdbEntry *selectedEntry = [self _clickedOrSelectedEntry]; + KPKEntry *selectedEntry = [self _clickedOrSelectedEntry]; if(selectedEntry) { [self _copyToPasteboard:selectedEntry.username overlayInfo:MPOverlayInfoUsername name:nil]; } } -- (void)copyCustomField:(id)sender { - KdbEntry *selectedEntry = [self _clickedOrSelectedEntry]; - if(selectedEntry && [selectedEntry isKindOfClass:[Kdb4Entry class]]) { - Kdb4Entry *entry = (Kdb4Entry *)selectedEntry; +- (void)copyCustomAttribute:(id)sender { + KPKEntry *selectedEntry = [self _clickedOrSelectedEntry]; + if(selectedEntry && [selectedEntry isKindOfClass:[KPKEntry class]]) { NSUInteger index = [sender tag]; - NSAssert((index >= 0) && (index < [entry.stringFields count]), @"Index for custom field needs to be valid"); - StringField *field = entry.stringFields[index]; - [self _copyToPasteboard:field.value overlayInfo:MPOverlayInfoCustom name:field.key]; + NSAssert((index >= 0) && (index < [selectedEntry.customAttributes count]), @"Index for custom field needs to be valid"); + KPKAttribute *attribute = selectedEntry.customAttributes[index]; + [self _copyToPasteboard:attribute.value overlayInfo:MPOverlayInfoCustom name:attribute.key]; } } - (void)copyURL:(id)sender { - KdbEntry *selectedEntry = [self _clickedOrSelectedEntry]; + KPKEntry *selectedEntry = [self _clickedOrSelectedEntry]; if(selectedEntry) { [self _copyToPasteboard:selectedEntry.url overlayInfo:MPOverlayInfoURL name:nil]; } } - (void)openURL:(id)sender { - KdbEntry *selectedEntry = [self _clickedOrSelectedEntry]; + KPKEntry *selectedEntry = [self _clickedOrSelectedEntry]; if(selectedEntry && [selectedEntry.url length] > 0) { NSURL *webURL = [NSURL URLWithString:selectedEntry.url]; [[NSWorkspace sharedWorkspace] openURL:webURL]; @@ -650,7 +650,7 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername"; } - (void)deleteNode:(id)sender { - KdbEntry *entry =[self _clickedOrSelectedEntry]; + KPKEntry *entry =[self _clickedOrSelectedEntry]; MPDocument *document = [[self windowController] document]; [document deleteEntry:entry]; } diff --git a/MacPass/MPGroupInspectorViewController.m b/MacPass/MPGroupInspectorViewController.m index f7bb8210..bb001cf6 100644 --- a/MacPass/MPGroupInspectorViewController.m +++ b/MacPass/MPGroupInspectorViewController.m @@ -10,16 +10,14 @@ #import "MPDocument.h" #import "MPPasteBoardController.h" -#import "Kdb.h" -#import "Kdb4Node.h" -#import "Kdb4Group+Undo.h" +#import "KPKGroup.h" #import "HNHScrollView.h" #import "HNHRoundedTextField.h" @interface MPGroupInspectorViewController () -@property (nonatomic, weak) KdbGroup *group; +@property (nonatomic, weak) KPKGroup *group; @end @@ -66,7 +64,7 @@ [self bind:@"group" toObject:document withKeyPath:@"selectedGroup" options:nil]; } -- (void)setGroup:(KdbGroup *)group { +- (void)setGroup:(KPKGroup *)group { if(_group != group) { _group = group; [self _updateBindings]; @@ -75,14 +73,8 @@ - (void)_updateBindings { if(self.group) { - [self.titleTextField bind:NSValueBinding toObject:self.group withKeyPath:@"nameUndoable" options:nil]; - if([self.group isKindOfClass:[Kdb4Group class]]) { - [self.notesTextView bind:NSValueBinding toObject:self.group withKeyPath:@"notesUndoable" options:nil]; - } - else { - [self.notesTextView unbind:NSValueBinding]; - [self.notesTextView setString:@""]; - } + [self.titleTextField bind:NSValueBinding toObject:self.group withKeyPath:@"name" options:nil]; + [self.notesTextView bind:NSValueBinding toObject:self.group withKeyPath:@"notes" options:nil]; } else { [self.titleTextField unbind:NSValueBinding]; diff --git a/MacPass/MPInspectorViewController.m b/MacPass/MPInspectorViewController.m index 7648abf2..d5a9a129 100644 --- a/MacPass/MPInspectorViewController.m +++ b/MacPass/MPInspectorViewController.m @@ -16,9 +16,6 @@ #import "NSDate+Humanized.h" -#import "KdbLib.h" -#import "Kdb4Node.h" -#import "Kdb3Node.h" #import "HNHGradientView.h" #import "MPPopupImageView.h" @@ -162,7 +159,7 @@ typedef NS_ENUM(NSUInteger, MPContentTab) { return; } - [self.itemImageView bind:NSValueBinding toObject:item withKeyPath:@"icon" options:nil]; + [self.itemImageView bind:NSValueBinding toObject:item withKeyPath:@"iconImage" options:nil]; if([item respondsToSelector:@selector(title)]) { [self.itemNameTextField bind:NSValueBinding toObject:item withKeyPath:@"title" options:nil]; diff --git a/MacPass/MPOutlineContextMenuDelegate.m b/MacPass/MPOutlineContextMenuDelegate.m index 2dd3f0a2..e98636c7 100644 --- a/MacPass/MPOutlineContextMenuDelegate.m +++ b/MacPass/MPOutlineContextMenuDelegate.m @@ -9,13 +9,13 @@ #import "MPOutlineContextMenuDelegate.h" #import "MPOutlineViewController.h" -#import "MPRootAdapter.h" #import "MPDocument.h" #import "MPActionHelper.h" #import "MPContextMenuHelper.h" -#import "Kdb.h" +#import "KPKGroup.h" +#import "KPKTree.h" NSString *const _MPOutlineMenuDefault = @"Default"; NSString *const _MPOutlineMenuTrash = @"Trash"; @@ -37,13 +37,16 @@ NSString *const _MPOutlineMenuTemplate = @"Template"; */ id item = [self.viewController itemUnderMouse]; - if( [item isKindOfClass:[MPRootAdapter class]]) { + if( [item isKindOfClass:[KPKTree class]]) { [self _updateRootMenu:menu]; } - if( [item isKindOfClass:[KdbGroup class]]) { - KdbGroup *group = (KdbGroup *)item; + if( [item isKindOfClass:[KPKGroup class]]) { + KPKGroup *group = (KPKGroup *)item; MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument]; + if(group && document.root == group ) { + + } if(group && document.trash == group) { [self _updateTrashMenu:menu]; } diff --git a/MacPass/MPOutlineDataSource.m b/MacPass/MPOutlineDataSource.m index ddff9209..b858800c 100644 --- a/MacPass/MPOutlineDataSource.m +++ b/MacPass/MPOutlineDataSource.m @@ -9,21 +9,17 @@ #import "MPOutlineDataSource.h" #import "MPDocument.h" #import "MPConstants.h" -#import "MPRootAdapter.h" -#import "KdbLib.h" -#import "KdbGroup+Undo.h" -#import "KdbEntry+Undo.h" -#import "KdbGroup+MPTreeTools.h" -#import "KdbEntry+MPTreeTools.h" +#import "KPKGroup.h" +#import "KPKEntry.h" +#import "KPKUTIs.h" -#import "UUID.h" -#import "UUID+Pasterboard.h" +#import "NSUUID+KeePassKit.h" @interface MPOutlineDataSource () -@property (weak) KdbGroup *draggedGroup; -@property (weak) KdbEntry *draggedEntry; +@property (weak) KPKGroup *draggedGroup; +@property (weak) KPKEntry *draggedEntry; @end @@ -33,8 +29,12 @@ - (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pasteboard { self.draggedGroup = nil; if([items count] == 1) { - [pasteboard setString:self.draggedGroup.name forType:MPGroupUTI]; - self.draggedGroup = [[items lastObject] representedObject]; + id item = [[items lastObject] representedObject]; + if(![item isKindOfClass:[KPKGroup class]]) { + return NO; + } + [pasteboard setString:self.draggedGroup.name forType:KPKGroupUTI]; + self.draggedGroup = item; return (nil != self.draggedGroup.parent); } return NO; @@ -50,25 +50,25 @@ oprationMask = NSDragOperationCopy; } */ - id targetItem = [item representedObject]; - if(targetItem == nil || [targetItem isKindOfClass:[MPRootAdapter class]]) { - return NSDragOperationNone; // no Target - } NSPasteboard *pasteBoard = [info draggingPasteboard]; NSArray *types = [pasteBoard types]; if([types count] > 1 || [types count] == 0) { return NSDragOperationNone; // We cannot work with more than one type } - + + id targetItem = [item representedObject]; + if( ![targetItem isKindOfClass:[KPKGroup class]] && ![targetItem isKindOfClass:[KPKEntry class]]) { + return NSDragOperationNone; // Block all unknown types + } MPDocument *document = [[[outlineView window] windowController] document]; NSString *draggedType = [types lastObject]; - if([draggedType isEqualToString:MPGroupUTI]) { + if([draggedType isEqualToString:KPKGroupUTI]) { // dragging group self.draggedEntry = nil; } - else if([draggedType isEqualToString:MPUUIDUTI]) { - NSArray *uuids = [pasteBoard readObjectsForClasses:@[[UUID class]] options:nil]; + else if([draggedType isEqualToString:KPKUUIDUTI]) { + NSArray *uuids = [pasteBoard readObjectsForClasses:@[[NSUUID class]] options:nil]; if([uuids count] != 1) { return NSDragOperationNone; // NO entry readable } @@ -79,7 +79,7 @@ return NSDragOperationNone; // unkonw type } - KdbGroup *targetGroup = targetItem; + KPKGroup *targetGroup = targetItem; BOOL validTarget = YES; if(self.draggedGroup) { if( self.draggedGroup == targetGroup ) { @@ -108,19 +108,19 @@ } id targetItem = [item representedObject]; - if(![targetItem isKindOfClass:[KdbGroup class]]) { + if(![targetItem isKindOfClass:[KPKGroup class]]) { return NO; // Wrong } - KdbGroup *targetGroup = (KdbGroup *)targetItem; + KPKGroup *targetGroup = (KPKGroup *)targetItem; NSString *draggedType = [types lastObject]; - if([draggedType isEqualToString:MPGroupUTI]) { - [self.draggedGroup moveToGroupUndoable:targetGroup atIndex:index]; + if([draggedType isEqualToString:KPKGroupUTI]) { + [self.draggedGroup moveToGroup:targetGroup atIndex:index]; return YES; } - else if([draggedType isEqualToString:MPUUIDUTI]) { - [self.draggedEntry moveToGroupUndoable:targetGroup atIndex:index]; + else if([draggedType isEqualToString:KPKUUIDUTI]) { + [self.draggedEntry moveToGroup:targetGroup atIndex:index]; return YES; } return NO; diff --git a/MacPass/MPOutlineViewController.h b/MacPass/MPOutlineViewController.h index 061cf314..2db6eb9d 100644 --- a/MacPass/MPOutlineViewController.h +++ b/MacPass/MPOutlineViewController.h @@ -11,7 +11,6 @@ APPKIT_EXTERN NSString *const MPOutlineViewDidChangeGroupSelection; @class MPOutlineViewDelegate; -@class KdbGroup; @class HNHGradientView; @class MPDocumentWindowController; diff --git a/MacPass/MPOutlineViewController.m b/MacPass/MPOutlineViewController.m index cbd0f23a..6ae9fc54 100644 --- a/MacPass/MPOutlineViewController.m +++ b/MacPass/MPOutlineViewController.m @@ -15,13 +15,14 @@ #import "MPActionHelper.h" #import "MPIconHelper.h" #import "MPUppercaseStringValueTransformer.h" -#import "MPRootAdapter.h" #import "MPNotifications.h" #import "MPOutlineContextMenuDelegate.h" -#import "KdbLib.h" -#import "Kdb4Node.h" -#import "KdbGroup+Undo.h" +#import "KPKTree.h" +#import "KPKGroup.h" +#import "KPKNode+IconImage.h" +#import "KPKMetaData.h" +#import "KPKUTIs.h" #import "HNHGradientView.h" @@ -72,7 +73,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; [_outlineView setMenu:[self _contextMenu]]; [_outlineView setAllowsEmptySelection:YES]; [_outlineView setFloatsGroupRows:NO]; - [_outlineView registerForDraggedTypes:@[ MPGroupUTI, MPEntryUTI, MPUUIDUTI ]]; + [_outlineView registerForDraggedTypes:@[ KPKGroupUTI, KPKUUIDUTI ]]; [_outlineView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES]; [_bottomBar setBorderType:HNHBorderTop]; [_addGroupButton setAction:[MPActionHelper actionOfType:MPActionAddGroup]]; @@ -89,11 +90,9 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; if(!_bindingEstablished) { MPDocument *document = [[self windowController] document]; [_treeController setChildrenKeyPath:@"groups"]; - [_treeController bind:NSContentBinding toObject:document withKeyPath:@"rootAdapter" options:nil]; + [_treeController bind:NSContentBinding toObject:document withKeyPath:@"tree" options:nil]; [_outlineView bind:NSContentBinding toObject:_treeController withKeyPath:@"arrangedObjects" options:nil]; - if([document.tree respondsToSelector:@selector(databaseName)]) { - [self bind:@"databaseNameWrapper" toObject:document.tree withKeyPath:@"databaseName" options:nil]; - } + [self bind:@"databaseNameWrapper" toObject:document.tree.metaData withKeyPath:@"databaseName" options:nil]; [_outlineView setDataSource:self.datasource]; _bindingEstablished = YES; } @@ -103,7 +102,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; - (void)_expandItems:(NSTreeNode *)node { id nodeItem = [node representedObject]; - if([nodeItem isKindOfClass:[MPRootAdapter class]]) { + if([nodeItem isKindOfClass:[KPKTree class]]) { [self.outlineView expandItem:node expandChildren:NO]; } else if([nodeItem respondsToSelector:@selector(isExpanded)]) { @@ -200,7 +199,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; #pragma mark Actions - (void)createGroup:(id)sender { - KdbGroup *group = [self _clickedOrSelectedGroup]; + KPKGroup *group = [self _clickedOrSelectedGroup]; MPDocument *document = [[self windowController] document]; if(!group) { group = document.root; @@ -220,17 +219,17 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; #pragma mark NSOutlineViewDelegate - (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item { NSTableCellView *view; - if( [self _itemIsRootNodeAdapter:item] ) { + if( [self _itemIsRootNode:item] ) { //NSDictionary *options = @{ NSValueTransformerBindingOption : [NSValueTransformer valueTransformerForName:MPUppsercaseStringValueTransformerName] }; view = [outlineView makeViewWithIdentifier:_MPOutlinveViewHeaderViewIdentifier owner:self]; [view.textField bind:NSValueBinding toObject:self withKeyPath:@"databaseNameWrapper" options:nil]; } else { - KdbGroup *group = [item representedObject]; + KPKGroup *group = [item representedObject]; view = [outlineView makeViewWithIdentifier:_MPOutlineViewDataViewIdentifier owner:self]; - NSImage *icon = [MPIconHelper icon:(MPIconType)[group image]]; - [view.imageView setImage:icon]; - [view.textField bind:NSValueBinding toObject:group withKeyPath:MPGroupNameUndoableKey options:nil]; + + [view.imageView setImage:group.iconImage]; + [view.textField bind:NSValueBinding toObject:group withKeyPath:@"name" options:nil]; [view.textField bind:@"count" toObject:group withKeyPath:@"entries.@count" options:nil]; } @@ -238,31 +237,31 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; } - (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item { - return [self _itemIsRootNodeAdapter:item]; + return [self _itemIsRootNode:item]; } - (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item { - return ![self _itemIsRootNodeAdapter:item]; + return ![self _itemIsRootNode:item]; } - (void)outlineViewSelectionDidChange:(NSNotification *)notification { NSTreeNode *treeNode = [_outlineView itemAtRow:[_outlineView selectedRow]]; - KdbGroup *selectedGroup = [treeNode representedObject]; + KPKGroup *selectedGroup = [treeNode representedObject]; MPDocument *document = [[self windowController] document]; document.selectedGroup = selectedGroup; } - (BOOL)outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item { - return ![self _itemIsRootNodeAdapter:item]; + return ![self _itemIsRootNode:item]; } - (void)outlineViewItemDidExpand:(NSNotification *)notification { NSDictionary *userInfo = [notification userInfo]; id item = userInfo[@"NSObject"]; id representedObject = [item representedObject]; - NSLog(@"expanded:%@",representedObject); - if([representedObject isKindOfClass:[Kdb4Group class]]) { - Kdb4Group *group = (Kdb4Group *)representedObject; + if([representedObject isKindOfClass:[KPKGroup class]]) { + NSLog(@"expanded:%@",representedObject); + KPKGroup *group = (KPKGroup *)representedObject; group.isExpanded = YES; } } @@ -270,9 +269,9 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; NSDictionary *userInfo = [notification userInfo]; id item = userInfo[@"NSObject"]; id representedObject = [item representedObject]; - NSLog(@"collapsed:%@",representedObject); - if([representedObject isKindOfClass:[Kdb4Group class]]) { - Kdb4Group *group = (Kdb4Group *)representedObject; + if([representedObject isKindOfClass:[KPKGroup class]]) { + NSLog(@"collapsed:%@",representedObject); + KPKGroup *group = (KPKGroup *)representedObject; group.isExpanded = NO; } } @@ -280,7 +279,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; #pragma mark - #pragma mark Private -- (KdbGroup *)_clickedOrSelectedGroup { +- (KPKGroup *)_clickedOrSelectedGroup { NSInteger row = [self.outlineView clickedRow]; if( row < 0 ) { row = [self.outlineView selectedRow]; @@ -294,9 +293,9 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; return menu; } -- (BOOL)_itemIsRootNodeAdapter:(id)item { +- (BOOL)_itemIsRootNode:(id)item { id node = [item representedObject]; - return [node isKindOfClass:[MPRootAdapter class]]; + return [node isKindOfClass:[KPKTree class]]; } @end diff --git a/MacPass/MPPasswordEditWindowController.m b/MacPass/MPPasswordEditWindowController.m index d7a48db2..e76b3e30 100644 --- a/MacPass/MPPasswordEditWindowController.m +++ b/MacPass/MPPasswordEditWindowController.m @@ -13,6 +13,8 @@ #import "NSString+Empty.h" #import "NSData+Keyfile.h" +#import "KPKTree.h" + @interface MPPasswordEditWindowController () { MPDocument * __unsafe_unretained _document; } @@ -93,7 +95,7 @@ } - (IBAction)generateKey:(id)sender { - NSData *data = [NSData generateKeyfiledataForVersion:(KPKVersion)(_document.version + 1)]; + NSData *data = [NSData generateKeyfiledataForVersion:_document.tree.minimumVersion]; if(data) { NSSavePanel *savePanel = [NSSavePanel savePanel]; [savePanel setAllowedFileTypes:@[@"key", @"xml"]]; diff --git a/MacPass/MPRootAdapter.h b/MacPass/MPRootAdapter.h deleted file mode 100644 index 56b57c9e..00000000 --- a/MacPass/MPRootAdapter.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// MPRootAdapter.h -// MacPass -// -// Created by Michael Starke on 26.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import - -@class KdbTree; - -@interface MPRootAdapter : NSObject - -@property (readonly, strong) NSArray *groups; -@property (nonatomic, strong) KdbTree *tree; -/* Subs to support interface */ -@property (weak, readonly, nonatomic) NSArray *entries; - -@end diff --git a/MacPass/MPRootAdapter.m b/MacPass/MPRootAdapter.m deleted file mode 100644 index b2a88d6f..00000000 --- a/MacPass/MPRootAdapter.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// MPRootAdapter.m -// MacPass -// -// Created by Michael Starke on 26.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "MPRootAdapter.h" -#import "Kdb.h" - -@interface MPRootAdapter () - -@property (strong) NSArray *groups; - -@end - -@implementation MPRootAdapter - - -- (void)setTree:(KdbTree *)tree { - if(_tree != tree) { - _tree = tree; - if(_tree) { - self.groups = @[_tree.root]; - } - else { - self.groups = nil; - } - } -} - -- (NSArray *)entries { - return nil; -} -@end diff --git a/MacPass/MPSavePanelAccessoryViewController.m b/MacPass/MPSavePanelAccessoryViewController.m index 742437b2..228f45d6 100644 --- a/MacPass/MPSavePanelAccessoryViewController.m +++ b/MacPass/MPSavePanelAccessoryViewController.m @@ -9,6 +9,9 @@ #import "MPSavePanelAccessoryViewController.h" #import "MPDocument.h" +#import "KPKUTIs.h" +#import "KPKTree.h" + @interface MPSavePanelAccessoryViewController () @end @@ -42,7 +45,7 @@ - (IBAction)setFileType:(id)sender { NSString *uti = [[self.fileTypePopupButton selectedItem] representedObject]; - BOOL showInfoText = (self.document.version == MPDatabaseVersion4) && [uti isEqualToString:@"com.hicknhack.macpass.kdb"]; + BOOL showInfoText = (self.document.tree.minimumVersion == KPKLegacyVersion && [uti isEqualToString:@"com.hicknhack.macpass.kdb"]); [self.infoTextField setHidden:!showInfoText]; [self.savePanel setAllowedFileTypes:@[uti]]; } @@ -55,13 +58,16 @@ } - (void)_updateView { - switch(self.document.version) { - case MPDatabaseVersion3: + switch(self.document.tree.minimumVersion) { + case KPKLegacyVersion: [self.fileTypePopupButton selectItemAtIndex:1]; break; - case MPDatabaseVersion4: + case KPKXmlVersion: [self.fileTypePopupButton selectItemAtIndex:0]; break; + case KPKUnknownVersion: + NSAssert(NO, @"Minimum Version should always be valid"); + break; } } diff --git a/MacPass/StringField+Undo.h b/MacPass/StringField+Undo.h deleted file mode 100644 index 734650fb..00000000 --- a/MacPass/StringField+Undo.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// StringField+Undo.h -// MacPass -// -// Created by Michael Starke on 28.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Node.h" - -APPKIT_EXTERN NSString *const MPStringFieldKeyUndoableKey; -APPKIT_EXTERN NSString *const MPStringFieldValueUndoableKey; - -@interface StringField (Undo) - - -- (NSString *)keyUndoable; -- (NSString *)valueUndoable; - -- (void)setKeyUndoable:(NSString *)key; -- (void)setValueUndoable:(NSString *)value; - -@end diff --git a/MacPass/StringField+Undo.m b/MacPass/StringField+Undo.m deleted file mode 100644 index 57c3e391..00000000 --- a/MacPass/StringField+Undo.m +++ /dev/null @@ -1,44 +0,0 @@ -// -// StringField+Undo.m -// MacPass -// -// Created by Michael Starke on 28.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "StringField+Undo.h" - -NSString *const MPStringFieldKeyUndoableKey = @"keyUndoable"; -NSString *const MPStringFieldValueUndoableKey = @"valueUndoable"; - -@implementation StringField (Undo) - -- (NSUndoManager *)undoManager { - return [[[NSDocumentController sharedDocumentController] currentDocument] undoManager]; -} - -- (NSString *)keyUndoable { - return self.key; -} - -- (NSString *)valueUndoable { - return self.value; -} - -- (void)setKeyUndoable:(NSString *)key { - if(![self.key isEqualToString:key]) { - [[self undoManager] registerUndoWithTarget:self selector:@selector(setKeyUndoable:) object:self.key]; - [[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_STRINGFILED_KEY", @"Set StringField key")]; - self.key = key; - } -} - -- (void)setValueUndoable:(NSString *)value { - if(![self.value isEqualToString:value]) { - [[self undoManager] registerUndoWithTarget:self selector:@selector(setValueUndoable:) object:self.value]; - [[self undoManager] setActionName:NSLocalizedString(@"UNDO_SET_STRINGFIELD_VALUE", @"Set StringField value")]; - self.value = value; - } -} - -@end diff --git a/MacPass/StringField+Validation.h b/MacPass/StringField+Validation.h deleted file mode 100644 index ef310f81..00000000 --- a/MacPass/StringField+Validation.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// StringField+Validation.h -// MacPass -// -// Created by Michael Starke on 19.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "Kdb4Node.h" - -@interface StringField (Validation) - -@end diff --git a/MacPass/StringField+Validation.m b/MacPass/StringField+Validation.m deleted file mode 100644 index e216b9f3..00000000 --- a/MacPass/StringField+Validation.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// StringField+Validation.m -// MacPass -// -// Created by Michael Starke on 19.07.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "StringField+Validation.h" -#import "Kdb4Entry+MPAdditions.h" - -@implementation StringField (Validation) - -- (BOOL)validateValue:(inout __autoreleasing id *)ioValue forKey:(NSString *)inKey error:(out NSError *__autoreleasing *)outError { - *ioValue = [self.entry uniqueKeyForProposal:*ioValue]; - return YES; -} - -@end diff --git a/MacPass/UUID+Pasterboard.h b/MacPass/UUID+Pasterboard.h deleted file mode 100644 index 3b7d161f..00000000 --- a/MacPass/UUID+Pasterboard.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// UUID+Pasterboard.h -// MacPass -// -// Created by Michael Starke on 04.08.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "UUID.h" - -@interface UUID (Pasterboard) - -@end diff --git a/MacPass/UUID+Pasterboard.m b/MacPass/UUID+Pasterboard.m deleted file mode 100644 index 0949d1ab..00000000 --- a/MacPass/UUID+Pasterboard.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// UUID+Pasterboard.m -// MacPass -// -// Created by Michael Starke on 04.08.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "UUID+Pasterboard.h" -#import "MPConstants.h" - -@implementation UUID (Pasterboard) - -#pragma mark NSCoding - -- (id)initWithCoder:(NSCoder *)aDecoder { - NSData *data = [aDecoder decodeObjectForKey:@"data"]; - self = [self initWithData:data]; - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:[self getData] forKey:@"data"]; -} - -#pragma mark - -#pragma mark NSPasteboardReading - -+ (NSArray *)readableTypesForPasteboard:(NSPasteboard *)pasteboard { - return @[ MPUUIDUTI ]; -} - -+ (NSPasteboardReadingOptions)readingOptionsForType:(NSString *)type pasteboard:(NSPasteboard *)pasteboard { - NSAssert([type isEqualToString:MPUUIDUTI], @"Only MPUUID type is supported"); - return NSPasteboardReadingAsKeyedArchive; -} -#pragma mark - -#pragma mark NSPasteboardWriting - -- (id)pasteboardPropertyListForType:(NSString *)type { - NSAssert([type isEqualToString:MPUUIDUTI], @"Only MPUUID type is supported"); - return [NSKeyedArchiver archivedDataWithRootObject:self]; -} - -- (NSArray *)writableTypesForPasteboard:(NSPasteboard *)pasteboard { - return @[ MPUUIDUTI ]; -} - -@end