Using KeePassKit Framework

Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
michael starke
2015-10-29 18:25:08 +01:00
parent 7f22bcf296
commit 8ddf2373dc
46 changed files with 130 additions and 134 deletions

View File

@@ -6,7 +6,7 @@
// Copyright (c) 2014 HicknHack Software GmbH. All rights reserved.
//
#import "KPKFormat.h"
#import "KeePassKit/KeePassKit.h"
@interface KPKFormat (MPUTIDetection)

View File

@@ -6,7 +6,7 @@
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "KPKNode.h"
#import "KeePassKit/KeePassKit.h"
@interface KPKNode (IconImage)

View File

@@ -8,12 +8,7 @@
#import "KPKNode+IconImage.h"
#import "KPKGroup.h"
#import "KPKIcon.h"
#import "KPKMetaData.h"
#import "KPKNode+Private.h"
#import "KPKTimeInfo.h"
#import "KPKTree.h"
#import "KeePassKit/KeePassKit.h"
#import "MPIconHelper.h"
@@ -39,7 +34,7 @@
}
if(self.iconUUID) {
KPKIcon *icon = [self.tree.metaData findIcon:self.iconUUID];
KPKIcon *icon;// = [self.tree.metaData findIcon:self.iconUUID];
if(icon && icon.image) {
return icon.image;
}

View File

@@ -25,8 +25,7 @@
#import "MPDocumentWindowController.h"
#import "MPActionHelper.h"
#import "KPKEntry.h"
#import "KPKGroup.h"
#import "KeePassKit/KeePassKit.h"
#define EDIT_TEMPLATES_ITEM_TAG 10;

View File

@@ -35,7 +35,7 @@
#import "MPTemporaryFileStorageCenter.h"
#import "MPValueTransformerHelper.h"
#import "KPKCompositeKey.h"
#import "KeePassKit/KeePassKit.h"
NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDidChangeStoredKeyFilesSettings";

View File

@@ -26,8 +26,7 @@
#import "MPEntryInspectorViewController.h"
#import "MPSelectedAttachmentTableCellView.h"
#import "KPKEntry.h"
#import "KPKBinary.h"
#import "KeePassKit/KeePassKit.h"
#import "HNHTableRowView.h"

View File

@@ -16,14 +16,9 @@
#import "MPAutotypeContext.h"
#import "MPKeyMapper.h"
#import "KPKEntry.h"
#import "KPKAutotype.h"
#import "KPKFormat.h"
#import "NSString+Commands.h"
#import "KeePassKit/KeePassKit.h"
#import <Carbon/Carbon.h>
#import <CommonCrypto/CommonCrypto.h>
static CGKeyCode kMPFunctionKeyCodes[] = { kVK_F1, kVK_F2, kVK_F3, kVK_F4, kVK_F5, kVK_F6, kVK_F7, kVK_F8, kVK_F9, kVK_F10, kVK_F11, kVK_F12, kVK_F13, kVK_F14, kVK_F15, kVK_F16, kVK_F17, kVK_F18, kVK_F19 };

View File

@@ -8,10 +8,7 @@
#import "MPAutotypeContext.h"
#import "KPKAutotype.h"
#import "KPKEntry.h"
#import "KPKWindowAssociation.h"
#import "NSString+Commands.h"
#import "KeePassKit/KeePassKit.h"
@interface MPAutotypeContext () {
NSString *_evaluatedCommand;

View File

@@ -18,7 +18,7 @@
#import "MPSettingsHelper.h"
#import "KPKEntry.h"
#import "KeePassKit/KeePassKit.h"
#import "DDHotKeyCenter.h"
#import "DDHotKey+MacPassAdditions.h"

View File

@@ -9,7 +9,7 @@
#import "MPAutotypePaste.h"
#import "MPPasteBoardController.h"
#import "NSString+Commands.h"
#import "KeePassKit/KeePassKit.h"
@interface MPAutotypePaste ()

View File

@@ -7,9 +7,8 @@
//
#import "MPContextBarViewController.h"
#import "KPKEntry.h"
#import "KPKTree.h"
#import "KPKMetaData.h"
#import "KeePassKit/KeePassKit.h"
#import "MPDocument.h"
#import "MPFlagsHelper.h"

View File

@@ -25,8 +25,7 @@
#import "MPCustomFieldTableCellView.h"
#import "MPEntryInspectorViewController.h"
#import "KPKEntry.h"
#import "KPKAttribute.h"
#import "KeePassKit/KeePassKit.h"
@implementation MPCustomFieldTableViewDelegate

View File

@@ -14,19 +14,13 @@
#import "MPSettingsHelper.h"
#import "MPNumericalInputFormatter.h"
#import "KPKXmlFormat.h"
#import "KPKGroup.h"
#import "KPKTree.h"
#import "KPKMetaData.h"
#import "KPKNode+IconImage.h"
#import "KPKCompositeKey.h"
#import "KeePassKit/KeePassKit.h"
#import "HNHRoundedTextField.h"
#import "HNHRoundedSecureTextField.h"
#import "HNHCommon.h"
#import "NSString+Empty.h"
#import "KPKNode+IconImage.h"
@interface MPDatabaseSettingsWindowController () {
NSString *_missingFeature;

View File

@@ -9,8 +9,8 @@
#import "MPDatePickingViewController.h"
#import "MPDocument.h"
#import "KPKNode.h"
#import "KPKTimeInfo.h"
#import "KeePassKit/KeePassKit.h"
typedef NS_ENUM(NSUInteger, MPDatePreset) {
MPDatePresetNone,

View File

@@ -22,8 +22,7 @@
#import "MPDocument.h"
#import "KPKEntry.h"
#import "KPKBinary.h"
#import "KeePassKit/KeePassKit.h"
@implementation MPDocument (Attachments)

View File

@@ -23,11 +23,7 @@
#import "MPDocument.h"
#import "MPAutotypeContext.h"
#import "KPKNode.h"
#import "KPKGroup.h"
#import "KPKEntry.h"
#import "KPKAutotype.h"
#import "KPKWindowAssociation.h"
#import "KeePassKit/KeePassKit.h"
#import "MPSettingsHelper.h"

View File

@@ -8,8 +8,7 @@
#import "MPDocument.h"
#import "KPKTree.h"
#import "KPKNode.h"
#import "KeePassKit/KeePassKit.h"
NSString *const MPDocumentDidBeginEditingSelectedItem = @"com.hicknhack.macpass.MPDocumentDidBeginEditingSelectedItem";
NSString *const MPDocumentDidCancelChangesToSelectedItem = @"com.hicknhack.macpass.MPDocumentDidCancelChangesToSelectedItem";

View File

@@ -9,9 +9,7 @@
#import "MPDocument.h"
#import "MPDocumentWindowController.h"
#import "KPKGroup.h"
#import "KPKEntry.h"
#import "KPKTimeInfo.h"
#import "KeePassKit/KeePassKit.h"
#import "MPFlagsHelper.h"

View File

@@ -21,7 +21,7 @@
//
#import <Cocoa/Cocoa.h>
#import "KPKVersion.h"
#import "KeePassKit/KeePassKit.h"
#import "MPEntrySearchContext.h"
#import "MPTargetNodeResolving.h"

View File

@@ -33,17 +33,7 @@
#import "MPTreeDelegate.h"
#import "MPTargetNodeResolving.h"
#import "DDXMLNode.h"
#import "KPKEntry.h"
#import "KPKGroup.h"
#import "KPKTree.h"
#import "KPKTree+Serializing.h"
#import "KPKCompositeKey.h"
#import "KPKMetaData.h"
#import "KPKTimeInfo.h"
#import "KPKAttribute.h"
#import "KeePassKit/KeePassKit.h"
#import "NSError+Messages.h"
#import "NSString+MPPasswordCreation.h"

View File

@@ -12,7 +12,7 @@
#import "HNHCommon.h"
#import "KPKFormat.h"
#import "KeePassKit/KeePassKit.h"
#import "KPKFormat+MPUTIDetection.h"
@interface MPDocumentController ()

View File

@@ -24,9 +24,7 @@
#import "MPSettingsHelper.h"
#import "MPToolbarDelegate.h"
#import "KPKCompositeKey.h"
#import "KPKEntry.h"
#import "KPKTree.h"
#import "KeePassKit/KeePassKit.h"
typedef NS_ENUM(NSUInteger, MPAlertContext) {
MPAlertLossySaveWarning,

View File

@@ -23,7 +23,7 @@
#import "MPDocumentWindowDelegate.h"
#import "MPDocument.h"
#import "KPKEntry.h"
#import "KeePassKit/KeePassKit.h"
@implementation MPDocumentWindowDelegate

View File

@@ -23,8 +23,7 @@
#import "MPEntryContextMenuDelegate.h"
#import "MPEntryViewController.h"
#import "KPKEntry.h"
#import "KPKAttribute.h"
#import "KeePassKit/KeePassKit.h"
static NSUInteger const kMPCustomFieldMenuItem = 1000;
static NSUInteger const kMPAttachmentsMenuItem = 2000;

View File

@@ -24,11 +24,7 @@
#import "MPActionHelper.h"
#import "MPSettingsHelper.h"
#import "KPKEntry.h"
#import "KPKBinary.h"
#import "KPKAutotype.h"
#import "KPKTimeInfo.h"
#import "KPKWindowAssociation.h"
#import "KeePassKit/KeePassKit.h"
#import "HNHScrollView.h"
#import "HNHRoundedSecureTextField.h"
@@ -184,7 +180,11 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
[savePanel beginSheetModalForWindow:[[self windowController] window] completionHandler:^(NSInteger result) {
if(result == NSFileHandlingPanelOKButton) {
[binary saveToLocation:[savePanel URL]];
NSError *error;
BOOL sucess = [binary saveToLocation:[savePanel URL] error:&error];
if(!sucess && error) {
[NSApp presentError:error];
}
}
}];
}

View File

@@ -23,8 +23,7 @@
#import "MPEntryTableDataSource.h"
#import "MPEntryViewController.h"
#import "KPKEntry.h"
#import "NSUUID+KeePassKit.h"
#import "KeePassKit/KeePassKit.h"
@interface MPEntryTableDataSource ()

View File

@@ -28,22 +28,13 @@
#import "MPValueTransformerHelper.h"
#import "MPEntryContextMenuDelegate.h"
#import "KPKUTIs.h"
#import "KPKGroup.h"
#import "KPKEntry.h"
#import "KPKNode+IconImage.h"
#import "KPKAttribute.h"
#import "KPKTimeInfo.h"
#import "KPKTree.h"
#import "KPKMetaData.h"
#import "KeePassKit/KeePassKit.h"
#import "HNHTableHeaderCell.h"
#import "HNHGradientView.h"
#import "MPNotifications.h"
#import "NSString+Commands.h"
#define STATUS_BAR_ANIMATION_TIME 0.15
#define EXPIRED_ENTRY_REFRESH_SECONDS 60

View File

@@ -11,11 +11,7 @@
#import "MPDocument.h"
#import "MPIconHelper.h"
#import "KPKNode.h"
#import "KPKEntry.h"
#import "KPKGroup.h"
#import "KPKAutotype.h"
#import "KPKWindowAssociation.h"
#import "KeePassKit/KeePassKit.h"
NSString *const kMPAutotypeCell = @"AutotypeCell";

View File

@@ -11,8 +11,7 @@
#import "MPPasteBoardController.h"
#import "MPValueTransformerHelper.h"
#import "KPKGroup.h"
#import "KPKTimeInfo.h"
#import "KeePassKit/KeePassKit.h"
#import "HNHScrollView.h"
#import "HNHRoundedTextField.h"

View File

@@ -16,19 +16,15 @@
#import "MPNotifications.h"
#import "MPPopupImageView.h"
#import "NSDate+Humanized.h"
#import "KeePassKit/KeePassKit.h"
#import "KPKEntry.h"
#import "KPKGroup.h"
#import "KPKTimeInfo.h"
#import "KPKTree.h"
#import "KPKMetaData.h"
#import "KPKNode.h"
#import "KPKNode+IconImage.h"
#import "HNHGradientView.h"
#import "NSDate+Humanized.h"
typedef NS_ENUM(NSUInteger, MPContentTab) {
MPEntryTab,
MPGroupTab,

View File

@@ -29,8 +29,7 @@
#import "MPActionHelper.h"
#import "MPContextMenuHelper.h"
#import "KPKGroup.h"
#import "KPKTree.h"
#import "KeePassKit/KeePassKit.h"
NSString *const _MPOutlineMenuDefault = @"Default";
NSString *const _MPOutlineMenuTrash = @"Trash";

View File

@@ -24,11 +24,7 @@
#import "MPDocument.h"
#import "MPConstants.h"
#import "KPKGroup.h"
#import "KPKEntry.h"
#import "KPKUTIs.h"
#import "NSUUID+KeePassKit.h"
#import "KeePassKit/KeePassKit.h"
@interface MPOutlineDataSource ()

View File

@@ -17,14 +17,8 @@
#import "MPOutlineContextMenuDelegate.h"
#import "MPOutlineDataSource.h"
#import "KPKEntry.h"
#import "KPKGroup.h"
#import "KPKMetaData.h"
#import "KPKNode.h"
#import "KeePassKit/KeePassKit.h"
#import "KPKNode+IconImage.h"
#import "KPKTimeInfo.h"
#import "KPKTree.h"
#import "KPKUTIs.h"
#import "HNHGradientView.h"

View File

@@ -13,7 +13,8 @@
#import "MPSettingsHelper.h"
#import "MPFlagsHelper.h"
#import "KPKEntry.h"
#import "KeePassKit/KeePassKit.h"
/*

View File

@@ -10,11 +10,8 @@
#import "MPDocument.h"
#import "HNHRoundedSecureTextField.h"
#import "NSString+Empty.h"
#import "NSData+Keyfile.h"
#import "KPKTree.h"
#import "KPKCompositeKey.h"
#import "KeePassKit/KeePassKit.h"
@interface MPPasswordEditWindowController ()

View File

@@ -9,7 +9,8 @@
#import "MPPluginManager.h"
#import "MPDocument.h"
#import "KPKTree.h"
#import "KeePassKit/KeePassKit.h"
@implementation MPPluginManager

View File

@@ -7,7 +7,8 @@
//
#import "MPReferenceBuilderViewController.h"
#import "KPKFormat.h"
#import "KeePassKit/KeePassKit.h"
@interface MPReferenceBuilderViewController ()

View File

@@ -7,7 +7,7 @@
//
#import "MPViewController.h"
#import "KPKVersion.h"
#import "KeePassKit/KeePassKit.h"
@class MPDocument;

View File

@@ -10,8 +10,7 @@
#import "MPDocument.h"
#import "MPConstants.h"
#import "KPKUTIs.h"
#import "KPKTree.h"
#import "KeePassKit/KeePassKit.h"
@interface MPSavePanelAccessoryViewController ()
@property (readwrite, assign) KPKVersion selectedVersion;

View File

@@ -9,7 +9,7 @@
#import "MPTemporaryFileStorage.h"
#import "MPTemporaryFileStorageCenter.h"
#import "KPKBinary.h"
#import "KeePassKit/KeePassKit.h"
#import "NSError+Messages.h"

View File

@@ -7,7 +7,8 @@
//
#import <Foundation/Foundation.h>
#import "KPKTree.h"
#import "KeePassKit/KeePassKit.h"
@class MPDocument;

View File

@@ -9,9 +9,8 @@
#import "MPWindowAssociationsTableViewDelegate.h"
#import "MPDocument.h"
#import "KPKEntry.h"
#import "KPKAutotype.h"
#import "KPKWindowAssociation.h"
#import "KeePassKit/KeePassKit.h"
@implementation MPWindowAssociationsTableViewDelegate

View File

@@ -7,7 +7,7 @@
//
#import "NSString+MPPasswordCreation.h"
#import "NSData+Random.h"
#import "KeePassKit/KeePassKit.h"
#import "MPSettingsHelper.h"