Added tooling for OTP handling to KPKEntry

This commit is contained in:
Michael Starke
2020-11-26 12:08:17 +01:00
parent 65626e3b11
commit 3807b0a0b7
3 changed files with 54 additions and 0 deletions

View File

@@ -232,6 +232,7 @@
4CAD748C15B889B700104512 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CAD748B15B889B700104512 /* Security.framework */; };
4CAD748E15B88AC100104512 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CAD748D15B88AC100104512 /* libz.dylib */; };
4CAD8AA622CF397B0090B2DD /* MPAutotypeDoctorReportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CAD8AA422CF397B0090B2DD /* MPAutotypeDoctorReportViewController.m */; };
4CB11241256EB77900204D1B /* KPKEntry+OTP.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB11240256EB77900204D1B /* KPKEntry+OTP.m */; };
4CB33F861EAF54A000C9341E /* KPKNode+MPIsHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB33F851EAF54A000C9341E /* KPKNode+MPIsHistory.m */; };
4CB9339916D3A0DD00A13B5D /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 4CB9339716D3A0DD00A13B5D /* Credits.rtf */; };
4CBA2ABA17074C07006D8139 /* MPSettingsHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CBA2AB917074C07006D8139 /* MPSettingsHelper.m */; };
@@ -782,6 +783,8 @@
4CAD748D15B88AC100104512 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
4CAD8AA322CF397B0090B2DD /* MPAutotypeDoctorReportViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPAutotypeDoctorReportViewController.h; sourceTree = "<group>"; };
4CAD8AA422CF397B0090B2DD /* MPAutotypeDoctorReportViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPAutotypeDoctorReportViewController.m; sourceTree = "<group>"; };
4CB1123F256EB77900204D1B /* KPKEntry+OTP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "KPKEntry+OTP.h"; sourceTree = "<group>"; };
4CB11240256EB77900204D1B /* KPKEntry+OTP.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "KPKEntry+OTP.m"; sourceTree = "<group>"; };
4CB33F841EAF54A000C9341E /* KPKNode+MPIsHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KPKNode+MPIsHistory.h"; sourceTree = "<group>"; };
4CB33F851EAF54A000C9341E /* KPKNode+MPIsHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KPKNode+MPIsHistory.m"; sourceTree = "<group>"; };
4CB63A6018986530002DEC4C /* MPFlagsHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPFlagsHelper.h; sourceTree = "<group>"; };
@@ -1192,6 +1195,8 @@
4C0949581FD6B89B004F2971 /* NSUserNotification+MPAdditions.m */,
4C6BF0742559BD4800E5812A /* KPKBinary+MacPassAddtions.h */,
4C6BF0752559BD4800E5812A /* KPKBinary+MacPassAddtions.m */,
4CB1123F256EB77900204D1B /* KPKEntry+OTP.h */,
4CB11240256EB77900204D1B /* KPKEntry+OTP.m */,
);
name = Categories;
sourceTree = "<group>";
@@ -1542,6 +1547,7 @@
4C77E36C15B84A240093A587 /* MacPass */ = {
isa = PBXGroup;
children = (
4CB1123E256EB74E00204D1B /* OTP */,
4CF9ECAE1BFDEC5700C58E99 /* Plugin */,
4C217D8E17A32BCF00609FAA /* Common */,
4C104129178CDD26001B5239 /* Categories */,
@@ -1696,6 +1702,13 @@
name = Protocolls;
sourceTree = "<group>";
};
4CB1123E256EB74E00204D1B /* OTP */ = {
isa = PBXGroup;
children = (
);
name = OTP;
sourceTree = "<group>";
};
4CCFA12C1BF0CC7A0078E0A1 /* Databases */ = {
isa = PBXGroup;
children = (
@@ -2172,6 +2185,7 @@
4CE298EB1795FC2A00DF7BDB /* MPEntryContextMenuDelegate.m in Sources */,
4CCCE8011D75CA48006AA951 /* MPArrayController.m in Sources */,
4CC0D2CE17974A47000B4BDA /* MPCustomFieldTableViewDelegate.m in Sources */,
4CB11241256EB77900204D1B /* KPKEntry+OTP.m in Sources */,
4CC0D2D117974A5A000B4BDA /* MPAttachmentTableViewDelegate.m in Sources */,
4C26C33F18D8C92100CF1A1C /* MPTemporaryFileStorage.m in Sources */,
4C663D411D6D91A900CB6237 /* MPNumberFormatter.m in Sources */,

19
MacPass/KPKEntry+OTP.h Normal file
View File

@@ -0,0 +1,19 @@
//
// KPKEntry+OTP.h
// MacPass
//
// Created by Michael Starke on 25.11.20.
// Copyright © 2020 HicknHack Software GmbH. All rights reserved.
//
#import <KeePassKit/KeePassKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface KPKEntry (OTP)
@property (readonly, assign, nonatomic) BOOL hasTOTP;
@end
NS_ASSUME_NONNULL_END

21
MacPass/KPKEntry+OTP.m Normal file
View File

@@ -0,0 +1,21 @@
//
// KPKEntry+OTP.m
// MacPass
//
// Created by Michael Starke on 25.11.20.
// Copyright © 2020 HicknHack Software GmbH. All rights reserved.
//
#import "KPKEntry+OTP.h"
@implementation KPKEntry (OTP)
+ (NSSet<NSString *> *)keyPathsForValuesAffectingHasTOTP {
return [NSSet setWithObject:NSStringFromSelector(@selector(attributes))];
}
- (BOOL)hasTOTP {
return NO;
}
@end