From 6ce6f6b9ec18af6ef8539e4a815c13cde41c7517 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 5 Feb 2012 22:18:38 +0100 Subject: [PATCH] Prefix change: OP -> MP --- MasterPassword.xcodeproj/project.pbxproj | 148 +++++++++--------- .../{OPAppDelegate.h => MPAppDelegate.h} | 6 +- .../{OPAppDelegate.m => MPAppDelegate.m} | 64 ++++---- MasterPassword/{OPConfig.h => MPConfig.h} | 6 +- MasterPassword/{OPConfig.m => MPConfig.m} | 10 +- MasterPassword/MPContentViewController.h | 16 ++ ...Controller.m => MPContentViewController.m} | 6 +- .../{OPElementEntity.h => MPElementEntity.h} | 4 +- .../{OPElementEntity.m => MPElementEntity.m} | 6 +- ...tedEntity.h => MPElementGeneratedEntity.h} | 6 +- ...tedEntity.m => MPElementGeneratedEntity.m} | 14 +- ...StoredEntity.h => MPElementStoredEntity.h} | 6 +- ...StoredEntity.m => MPElementStoredEntity.m} | 24 +-- ...ewController.h => MPGuideViewController.h} | 4 +- ...ewController.m => MPGuideViewController.m} | 12 +- ...iewController.h => MPMainViewController.h} | 14 +- ...iewController.m => MPMainViewController.m} | 80 +++++----- ...wController.h => MPRecentViewController.h} | 4 +- ...wController.m => MPRecentViewController.m} | 6 +- ...{OPSearchDelegate.h => MPSearchDelegate.h} | 12 +- ...{OPSearchDelegate.m => MPSearchDelegate.m} | 36 ++--- MasterPassword/MPTypeViewController.h | 21 +++ ...iewController.m => MPTypeViewController.m} | 22 +-- MasterPassword/MPTypes.h | 38 +++++ MasterPassword/{OPTypes.m => MPTypes.m} | 74 ++++----- MasterPassword/MainStoryboard_iPad.storyboard | 89 ----------- .../MainStoryboard_iPhone.storyboard | 14 +- MasterPassword/MasterPassword-Prefix.pch | 4 +- .../MasterPassword.xcdatamodel/contents | 16 +- MasterPassword/OPContentViewController.h | 16 -- MasterPassword/OPTypeViewController.h | 21 --- MasterPassword/OPTypes.h | 38 ----- MasterPassword/Resources/help.html | 6 +- MasterPassword/ciphers.plist | 4 +- MasterPassword/main.m | 4 +- MasterPassword/types.c | 9 -- 36 files changed, 379 insertions(+), 481 deletions(-) rename MasterPassword/{OPAppDelegate.h => MPAppDelegate.h} (90%) rename MasterPassword/{OPAppDelegate.m => MPAppDelegate.m} (93%) rename MasterPassword/{OPConfig.h => MPConfig.h} (88%) rename MasterPassword/{OPConfig.m => MPConfig.m} (92%) create mode 100644 MasterPassword/MPContentViewController.h rename MasterPassword/{OPContentViewController.m => MPContentViewController.m} (80%) rename MasterPassword/{OPElementEntity.h => MPElementEntity.h} (88%) rename MasterPassword/{OPElementEntity.m => MPElementEntity.m} (90%) rename MasterPassword/{OPElementGeneratedEntity.h => MPElementGeneratedEntity.h} (68%) rename MasterPassword/{OPElementGeneratedEntity.m => MPElementGeneratedEntity.m} (60%) rename MasterPassword/{OPElementStoredEntity.h => MPElementStoredEntity.h} (70%) rename MasterPassword/{OPElementStoredEntity.m => MPElementStoredEntity.m} (79%) rename MasterPassword/{OPGuideViewController.h => MPGuideViewController.h} (75%) rename MasterPassword/{OPGuideViewController.m => MPGuideViewController.m} (75%) rename MasterPassword/{OPMainViewController.h => MPMainViewController.h} (80%) rename MasterPassword/{OPMainViewController.m => MPMainViewController.m} (86%) rename MasterPassword/{OPRecentViewController.h => MPRecentViewController.h} (72%) rename MasterPassword/{OPRecentViewController.m => MPRecentViewController.m} (75%) rename MasterPassword/{OPSearchDelegate.h => MPSearchDelegate.h} (64%) rename MasterPassword/{OPSearchDelegate.m => MPSearchDelegate.m} (91%) create mode 100644 MasterPassword/MPTypeViewController.h rename MasterPassword/{OPTypeViewController.m => MPTypeViewController.m} (79%) create mode 100644 MasterPassword/MPTypes.h rename MasterPassword/{OPTypes.m => MPTypes.m} (55%) delete mode 100644 MasterPassword/MainStoryboard_iPad.storyboard delete mode 100644 MasterPassword/OPContentViewController.h delete mode 100644 MasterPassword/OPTypeViewController.h delete mode 100644 MasterPassword/OPTypes.h delete mode 100644 MasterPassword/types.c diff --git a/MasterPassword.xcodeproj/project.pbxproj b/MasterPassword.xcodeproj/project.pbxproj index 1e92fe88..1484af21 100644 --- a/MasterPassword.xcodeproj/project.pbxproj +++ b/MasterPassword.xcodeproj/project.pbxproj @@ -7,27 +7,25 @@ objects = { /* Begin PBXBuildFile section */ - DA007F5214B24DCD00251337 /* OPConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = DA007F5114B24DCD00251337 /* OPConfig.m */; }; DA007F5514B25EE100251337 /* ciphers.plist in Resources */ = {isa = PBXBuildFile; fileRef = DA007F5414B25EE100251337 /* ciphers.plist */; }; DA04E33E14B1E70400ECA4F3 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA04E33D14B1E70400ECA4F3 /* MobileCoreServices.framework */; }; - DA0A848C14C4DFCB0090EA8E /* OPElementGeneratedEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0A848B14C4DFCB0090EA8E /* OPElementGeneratedEntity.m */; }; + DA0A848C14C4DFCB0090EA8E /* MPElementGeneratedEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0A848B14C4DFCB0090EA8E /* MPElementGeneratedEntity.m */; }; DA0B951114C2D69E001D4EB1 /* help.html in Resources */ = {isa = PBXBuildFile; fileRef = DA0B951014C2D69E001D4EB1 /* help.html */; }; - DA34DA0D14B1BC7D00F721C1 /* OPElementStoredEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = DA34DA0C14B1BC7D00F721C1 /* OPElementStoredEntity.m */; }; - DA34DA1114B1BC7E00F721C1 /* OPElementEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = DA34DA1014B1BC7E00F721C1 /* OPElementEntity.m */; }; - DA34DA1614B1BEA100F721C1 /* OPTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = DA34DA1514B1BEA100F721C1 /* OPTypes.m */; }; + DA34DA0D14B1BC7D00F721C1 /* MPElementStoredEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = DA34DA0C14B1BC7D00F721C1 /* MPElementStoredEntity.m */; }; + DA34DA1114B1BC7E00F721C1 /* MPElementEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = DA34DA1014B1BC7E00F721C1 /* MPElementEntity.m */; }; DA41A40B14DB3BF100638533 /* guide_page_0.png in Resources */ = {isa = PBXBuildFile; fileRef = DA41A40914DB3BF100638533 /* guide_page_0.png */; }; DA41A40C14DB3BF100638533 /* guide_page_0@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA41A40A14DB3BF100638533 /* guide_page_0@2x.png */; }; - DA55B29E14B38272001131B7 /* OPContentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA55B29D14B38272001131B7 /* OPContentViewController.m */; }; - DA55B2A214B4EB47001131B7 /* OPSearchDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DA55B2A114B4EB46001131B7 /* OPSearchDelegate.m */; }; + DA55B29E14B38272001131B7 /* MPContentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA55B29D14B38272001131B7 /* MPContentViewController.m */; }; + DA55B2A214B4EB47001131B7 /* MPSearchDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DA55B2A114B4EB46001131B7 /* MPSearchDelegate.m */; }; DA5BFA49147E415C00F98B1E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA5BFA48147E415C00F98B1E /* UIKit.framework */; }; DA5BFA4B147E415C00F98B1E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA5BFA4A147E415C00F98B1E /* Foundation.framework */; }; DA5BFA4D147E415C00F98B1E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA5BFA4C147E415C00F98B1E /* CoreGraphics.framework */; }; DA5BFA4F147E415C00F98B1E /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA5BFA4E147E415C00F98B1E /* CoreData.framework */; }; DA5BFA55147E415C00F98B1E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA5BFA53147E415C00F98B1E /* InfoPlist.strings */; }; DA5BFA57147E415C00F98B1E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5BFA56147E415C00F98B1E /* main.m */; }; - DA5BFA5B147E415C00F98B1E /* OPAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5BFA5A147E415C00F98B1E /* OPAppDelegate.m */; }; + DA5BFA5B147E415C00F98B1E /* MPAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5BFA5A147E415C00F98B1E /* MPAppDelegate.m */; }; DA5BFA64147E415C00F98B1E /* MasterPassword.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = DA5BFA62147E415C00F98B1E /* MasterPassword.xcdatamodeld */; }; - DA5BFA67147E415C00F98B1E /* OPMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5BFA66147E415C00F98B1E /* OPMainViewController.m */; }; + DA5BFA67147E415C00F98B1E /* MPMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5BFA66147E415C00F98B1E /* MPMainViewController.m */; }; DA5DB7A614BE4B19002DD256 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5DB7A514BE4B19002DD256 /* Default.png */; }; DA5DB7A814BE4B4B002DD256 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA5DB7A714BE4B4B002DD256 /* Default@2x.png */; }; DA6556FE14D730B700841C99 /* guide_page_1.png in Resources */ = {isa = PBXBuildFile; fileRef = DA6556F814D730B700841C99 /* guide_page_1.png */; }; @@ -36,7 +34,7 @@ DA65570114D730B700841C99 /* guide_page_4.png in Resources */ = {isa = PBXBuildFile; fileRef = DA6556FB14D730B700841C99 /* guide_page_4.png */; }; DA65570214D730B700841C99 /* guide_page_5.png in Resources */ = {isa = PBXBuildFile; fileRef = DA6556FC14D730B700841C99 /* guide_page_5.png */; }; DA65570314D730B700841C99 /* guide_page_6.png in Resources */ = {isa = PBXBuildFile; fileRef = DA6556FD14D730B700841C99 /* guide_page_6.png */; }; - DA65570614D731F000841C99 /* OPGuideViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA65570514D731F000841C99 /* OPGuideViewController.m */; }; + DA65570614D731F000841C99 /* MPGuideViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA65570514D731F000841C99 /* MPGuideViewController.m */; }; DA65570D14D760BD00841C99 /* guide_page_1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA65570714D760BD00841C99 /* guide_page_1@2x.png */; }; DA65570E14D760BD00841C99 /* guide_page_2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA65570814D760BD00841C99 /* guide_page_2@2x.png */; }; DA65570F14D760BD00841C99 /* guide_page_3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA65570914D760BD00841C99 /* guide_page_3@2x.png */; }; @@ -123,7 +121,6 @@ DA7659AF14C5E22E00769249 /* Square-bottom.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7659AD14C5E22E00769249 /* Square-bottom.png */; }; DA7659B014C5E22E00769249 /* Square-top.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7659AE14C5E22E00769249 /* Square-top.png */; }; DA7974C214C8C98500A71457 /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA7974C314C8C98500A71457 /* MainStoryboard_iPhone.storyboard */; }; - DA7974C414C8C98C00A71457 /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DA7974C514C8C98C00A71457 /* MainStoryboard_iPad.storyboard */; }; DA7974C814C8CA5000A71457 /* Pearl.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA7974C614C8CA5000A71457 /* Pearl.strings */; }; DA84808414CB3DBA00A2FA22 /* MessageView.h in Headers */ = {isa = PBXBuildFile; fileRef = DA84808214CB3DBA00A2FA22 /* MessageView.h */; }; DA84808514CB3DBA00A2FA22 /* MessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = DA84808314CB3DBA00A2FA22 /* MessageView.m */; }; @@ -245,6 +242,8 @@ DA95D5F614DF0B9F008D1B94 /* IASKPSTextFieldSpecifierViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA95D5CC14DF0691008D1B94 /* IASKPSTextFieldSpecifierViewCell.xib */; }; DA95D5F714DF0B9F008D1B94 /* IASKPSToggleSwitchSpecifierViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA95D5CD14DF0691008D1B94 /* IASKPSToggleSwitchSpecifierViewCell.xib */; }; DA95D5F814DF0B9F008D1B94 /* IASKSpecifierValuesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA95D5CE14DF0691008D1B94 /* IASKSpecifierValuesView.xib */; }; + DA95D5FD14DF295F008D1B94 /* MPConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = DA95D5F914DF295E008D1B94 /* MPConfig.m */; }; + DA95D5FE14DF295F008D1B94 /* MPTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = DA95D5FB14DF295F008D1B94 /* MPTypes.m */; }; DAA3B68E14CCCEE700F35AF6 /* icon_addressbook-person@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DAA3B53814CCCEE700F35AF6 /* icon_addressbook-person@2x.png */; }; DAA3B68F14CCCEE700F35AF6 /* icon_addressbook.png in Resources */ = {isa = PBXBuildFile; fileRef = DAA3B53914CCCEE700F35AF6 /* icon_addressbook.png */; }; DAA3B69014CCCEE700F35AF6 /* icon_addressbook@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DAA3B53A14CCCEE700F35AF6 /* icon_addressbook@2x.png */; }; @@ -667,9 +666,9 @@ DAC781311482AAD800BCF976 /* ValidatingTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = DAC780EE1482AAD700BCF976 /* ValidatingTextField.m */; }; DAC781321482AAD800BCF976 /* WebViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = DAC780EF1482AAD700BCF976 /* WebViewController.h */; }; DAC781331482AAD800BCF976 /* WebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAC780F01482AAD700BCF976 /* WebViewController.m */; }; - DAC781361482E67300BCF976 /* OPRecentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAC781351482E67300BCF976 /* OPRecentViewController.m */; }; + DAC781361482E67300BCF976 /* MPRecentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAC781351482E67300BCF976 /* MPRecentViewController.m */; }; DADC3C4D14C62B350091CB4D /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DADC3C4C14C62B350091CB4D /* Settings.bundle */; }; - DAE2C648148247E500BA6B10 /* OPTypeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAE2C646148247E500BA6B10 /* OPTypeViewController.m */; }; + DAE2C648148247E500BA6B10 /* MPTypeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAE2C646148247E500BA6B10 /* MPTypeViewController.m */; }; DAE998D214C1D2A0002D7C22 /* Content-Backdrop.png in Resources */ = {isa = PBXBuildFile; fileRef = DAE9987914C1D2A0002D7C22 /* Content-Backdrop.png */; }; DAE998D314C1D2A0002D7C22 /* Content-Backdrop@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DAE9987A14C1D2A0002D7C22 /* Content-Backdrop@2x.png */; }; DAE998D414C1D2A0002D7C22 /* Bold_Lines.png in Resources */ = {isa = PBXBuildFile; fileRef = DAE9987C14C1D2A0002D7C22 /* Bold_Lines.png */; }; @@ -744,25 +743,22 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - DA007F5014B24DCC00251337 /* OPConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPConfig.h; sourceTree = ""; }; - DA007F5114B24DCD00251337 /* OPConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPConfig.m; sourceTree = ""; }; + DA007F5014B24DCC00251337 /* MPConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConfig.h; sourceTree = ""; }; DA007F5414B25EE100251337 /* ciphers.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = ciphers.plist; sourceTree = ""; }; DA04E33D14B1E70400ECA4F3 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; - DA0A848A14C4DFCB0090EA8E /* OPElementGeneratedEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPElementGeneratedEntity.h; sourceTree = ""; }; - DA0A848B14C4DFCB0090EA8E /* OPElementGeneratedEntity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPElementGeneratedEntity.m; sourceTree = ""; }; + DA0A848A14C4DFCB0090EA8E /* MPElementGeneratedEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPElementGeneratedEntity.h; sourceTree = ""; }; + DA0A848B14C4DFCB0090EA8E /* MPElementGeneratedEntity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPElementGeneratedEntity.m; sourceTree = ""; }; DA0B951014C2D69E001D4EB1 /* help.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = help.html; path = Resources/help.html; sourceTree = ""; }; - DA34DA0B14B1BC7D00F721C1 /* OPElementStoredEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPElementStoredEntity.h; sourceTree = ""; }; - DA34DA0C14B1BC7D00F721C1 /* OPElementStoredEntity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPElementStoredEntity.m; sourceTree = ""; }; - DA34DA0F14B1BC7E00F721C1 /* OPElementEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPElementEntity.h; sourceTree = ""; }; - DA34DA1014B1BC7E00F721C1 /* OPElementEntity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPElementEntity.m; sourceTree = ""; }; - DA34DA1414B1BEA100F721C1 /* OPTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPTypes.h; sourceTree = ""; }; - DA34DA1514B1BEA100F721C1 /* OPTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPTypes.m; sourceTree = ""; }; + DA34DA0B14B1BC7D00F721C1 /* MPElementStoredEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPElementStoredEntity.h; sourceTree = ""; }; + DA34DA0C14B1BC7D00F721C1 /* MPElementStoredEntity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPElementStoredEntity.m; sourceTree = ""; }; + DA34DA0F14B1BC7E00F721C1 /* MPElementEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPElementEntity.h; sourceTree = ""; }; + DA34DA1014B1BC7E00F721C1 /* MPElementEntity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPElementEntity.m; sourceTree = ""; }; DA41A40914DB3BF100638533 /* guide_page_0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = guide_page_0.png; sourceTree = ""; }; DA41A40A14DB3BF100638533 /* guide_page_0@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "guide_page_0@2x.png"; sourceTree = ""; }; - DA55B29C14B38272001131B7 /* OPContentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPContentViewController.h; sourceTree = ""; }; - DA55B29D14B38272001131B7 /* OPContentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPContentViewController.m; sourceTree = ""; }; - DA55B2A014B4EB46001131B7 /* OPSearchDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPSearchDelegate.h; sourceTree = ""; }; - DA55B2A114B4EB46001131B7 /* OPSearchDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPSearchDelegate.m; sourceTree = ""; }; + DA55B29C14B38272001131B7 /* MPContentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPContentViewController.h; sourceTree = ""; }; + DA55B29D14B38272001131B7 /* MPContentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPContentViewController.m; sourceTree = ""; }; + DA55B2A014B4EB46001131B7 /* MPSearchDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSearchDelegate.h; sourceTree = ""; }; + DA55B2A114B4EB46001131B7 /* MPSearchDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSearchDelegate.m; sourceTree = ""; }; DA5BFA44147E415C00F98B1E /* MasterPassword.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MasterPassword.app; sourceTree = BUILT_PRODUCTS_DIR; }; DA5BFA48147E415C00F98B1E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; DA5BFA4A147E415C00F98B1E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -772,11 +768,11 @@ DA5BFA54147E415C00F98B1E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; DA5BFA56147E415C00F98B1E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; DA5BFA58147E415C00F98B1E /* MasterPassword-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MasterPassword-Prefix.pch"; sourceTree = ""; }; - DA5BFA59147E415C00F98B1E /* OPAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OPAppDelegate.h; sourceTree = ""; }; - DA5BFA5A147E415C00F98B1E /* OPAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OPAppDelegate.m; sourceTree = ""; }; + DA5BFA59147E415C00F98B1E /* MPAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPAppDelegate.h; sourceTree = ""; }; + DA5BFA5A147E415C00F98B1E /* MPAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPAppDelegate.m; sourceTree = ""; }; DA5BFA63147E415C00F98B1E /* MasterPassword.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MasterPassword.xcdatamodel; sourceTree = ""; }; - DA5BFA65147E415C00F98B1E /* OPMainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OPMainViewController.h; sourceTree = ""; }; - DA5BFA66147E415C00F98B1E /* OPMainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OPMainViewController.m; sourceTree = ""; }; + DA5BFA65147E415C00F98B1E /* MPMainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPMainViewController.h; sourceTree = ""; }; + DA5BFA66147E415C00F98B1E /* MPMainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPMainViewController.m; sourceTree = ""; }; DA5DB7A514BE4B19002DD256 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../Default.png; sourceTree = ""; }; DA5DB7A714BE4B4B002DD256 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "../Default@2x.png"; sourceTree = ""; }; DA6556F814D730B700841C99 /* guide_page_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = guide_page_1.png; sourceTree = ""; }; @@ -785,8 +781,8 @@ DA6556FB14D730B700841C99 /* guide_page_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = guide_page_4.png; sourceTree = ""; }; DA6556FC14D730B700841C99 /* guide_page_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = guide_page_5.png; sourceTree = ""; }; DA6556FD14D730B700841C99 /* guide_page_6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = guide_page_6.png; sourceTree = ""; }; - DA65570414D731F000841C99 /* OPGuideViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPGuideViewController.h; sourceTree = ""; }; - DA65570514D731F000841C99 /* OPGuideViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPGuideViewController.m; sourceTree = ""; }; + DA65570414D731F000841C99 /* MPGuideViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGuideViewController.h; sourceTree = ""; }; + DA65570514D731F000841C99 /* MPGuideViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGuideViewController.m; sourceTree = ""; }; DA65570714D760BD00841C99 /* guide_page_1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "guide_page_1@2x.png"; sourceTree = ""; }; DA65570814D760BD00841C99 /* guide_page_2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "guide_page_2@2x.png"; sourceTree = ""; }; DA65570914D760BD00841C99 /* guide_page_3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "guide_page_3@2x.png"; sourceTree = ""; }; @@ -873,7 +869,6 @@ DA7659AD14C5E22E00769249 /* Square-bottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Square-bottom.png"; sourceTree = ""; }; DA7659AE14C5E22E00769249 /* Square-top.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Square-top.png"; sourceTree = ""; }; DA7974C314C8C98500A71457 /* MainStoryboard_iPhone.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = MainStoryboard_iPhone.storyboard; sourceTree = ""; }; - DA7974C514C8C98C00A71457 /* MainStoryboard_iPad.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = MainStoryboard_iPad.storyboard; sourceTree = ""; }; DA7974C714C8CA5000A71457 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Pearl.strings; sourceTree = ""; }; DA84808214CB3DBA00A2FA22 /* MessageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageView.h; sourceTree = ""; }; DA84808314CB3DBA00A2FA22 /* MessageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageView.m; sourceTree = ""; }; @@ -995,6 +990,10 @@ DA95D5CD14DF0691008D1B94 /* IASKPSToggleSwitchSpecifierViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IASKPSToggleSwitchSpecifierViewCell.xib; sourceTree = ""; }; DA95D5CE14DF0691008D1B94 /* IASKSpecifierValuesView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IASKSpecifierValuesView.xib; sourceTree = ""; }; DA95D5F014DF0B1E008D1B94 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + DA95D5F914DF295E008D1B94 /* MPConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConfig.m; sourceTree = ""; }; + DA95D5FA14DF295E008D1B94 /* MPTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTypes.h; sourceTree = ""; }; + DA95D5FB14DF295F008D1B94 /* MPTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTypes.m; sourceTree = ""; }; + DA95D5FC14DF295F008D1B94 /* MPTypeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTypeViewController.h; sourceTree = ""; }; DAA3B53814CCCEE700F35AF6 /* icon_addressbook-person@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_addressbook-person@2x.png"; sourceTree = ""; }; DAA3B53914CCCEE700F35AF6 /* icon_addressbook.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_addressbook.png; sourceTree = ""; }; DAA3B53A14CCCEE700F35AF6 /* icon_addressbook@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_addressbook@2x.png"; sourceTree = ""; }; @@ -1416,11 +1415,10 @@ DAC780EE1482AAD700BCF976 /* ValidatingTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ValidatingTextField.m; sourceTree = ""; }; DAC780EF1482AAD700BCF976 /* WebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewController.h; sourceTree = ""; }; DAC780F01482AAD700BCF976 /* WebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewController.m; sourceTree = ""; }; - DAC781341482E67300BCF976 /* OPRecentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPRecentViewController.h; sourceTree = ""; }; - DAC781351482E67300BCF976 /* OPRecentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPRecentViewController.m; sourceTree = ""; }; + DAC781341482E67300BCF976 /* MPRecentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRecentViewController.h; sourceTree = ""; }; + DAC781351482E67300BCF976 /* MPRecentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRecentViewController.m; sourceTree = ""; }; DADC3C4C14C62B350091CB4D /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; - DAE2C645148247E500BA6B10 /* OPTypeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPTypeViewController.h; sourceTree = ""; }; - DAE2C646148247E500BA6B10 /* OPTypeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPTypeViewController.m; sourceTree = ""; }; + DAE2C646148247E500BA6B10 /* MPTypeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTypeViewController.m; sourceTree = ""; }; DAE9987914C1D2A0002D7C22 /* Content-Backdrop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Content-Backdrop.png"; path = "Resources/Content-Backdrop.png"; sourceTree = ""; }; DAE9987A14C1D2A0002D7C22 /* Content-Backdrop@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Content-Backdrop@2x.png"; path = "Resources/Content-Backdrop@2x.png"; sourceTree = ""; }; DAE9987C14C1D2A0002D7C22 /* Bold_Lines.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Bold_Lines.png; sourceTree = ""; }; @@ -1912,24 +1910,24 @@ DA8E8E4714DDA62D0044257E /* MasterPassword.entitlements */, DA7C28A214AF02A000491972 /* Models */, DA7C28A314AF02B100491972 /* Data */, - DA5BFA59147E415C00F98B1E /* OPAppDelegate.h */, - DA5BFA5A147E415C00F98B1E /* OPAppDelegate.m */, - DA5BFA65147E415C00F98B1E /* OPMainViewController.h */, - DA5BFA66147E415C00F98B1E /* OPMainViewController.m */, - DA65570414D731F000841C99 /* OPGuideViewController.h */, - DA65570514D731F000841C99 /* OPGuideViewController.m */, - DA55B2A014B4EB46001131B7 /* OPSearchDelegate.h */, - DA55B2A114B4EB46001131B7 /* OPSearchDelegate.m */, - DAC781341482E67300BCF976 /* OPRecentViewController.h */, - DAC781351482E67300BCF976 /* OPRecentViewController.m */, - DAE2C645148247E500BA6B10 /* OPTypeViewController.h */, - DAE2C646148247E500BA6B10 /* OPTypeViewController.m */, - DA55B29C14B38272001131B7 /* OPContentViewController.h */, - DA55B29D14B38272001131B7 /* OPContentViewController.m */, - DA34DA1414B1BEA100F721C1 /* OPTypes.h */, - DA34DA1514B1BEA100F721C1 /* OPTypes.m */, - DA007F5014B24DCC00251337 /* OPConfig.h */, - DA007F5114B24DCD00251337 /* OPConfig.m */, + DA5BFA59147E415C00F98B1E /* MPAppDelegate.h */, + DA5BFA5A147E415C00F98B1E /* MPAppDelegate.m */, + DA5BFA65147E415C00F98B1E /* MPMainViewController.h */, + DA5BFA66147E415C00F98B1E /* MPMainViewController.m */, + DA65570414D731F000841C99 /* MPGuideViewController.h */, + DA65570514D731F000841C99 /* MPGuideViewController.m */, + DA55B2A014B4EB46001131B7 /* MPSearchDelegate.h */, + DA55B2A114B4EB46001131B7 /* MPSearchDelegate.m */, + DAC781341482E67300BCF976 /* MPRecentViewController.h */, + DAC781351482E67300BCF976 /* MPRecentViewController.m */, + DA95D5FC14DF295F008D1B94 /* MPTypeViewController.h */, + DAE2C646148247E500BA6B10 /* MPTypeViewController.m */, + DA55B29C14B38272001131B7 /* MPContentViewController.h */, + DA55B29D14B38272001131B7 /* MPContentViewController.m */, + DA007F5014B24DCC00251337 /* MPConfig.h */, + DA95D5F914DF295E008D1B94 /* MPConfig.m */, + DA95D5FA14DF295E008D1B94 /* MPTypes.h */, + DA95D5FB14DF295F008D1B94 /* MPTypes.m */, DADC3C4C14C62B350091CB4D /* Settings.bundle */, DA5BFA51147E415C00F98B1E /* Supporting Files */, ); @@ -1993,7 +1991,6 @@ isa = PBXGroup; children = ( DA7974C314C8C98500A71457 /* MainStoryboard_iPhone.storyboard */, - DA7974C514C8C98C00A71457 /* MainStoryboard_iPad.storyboard */, DA5BFA62147E415C00F98B1E /* MasterPassword.xcdatamodeld */, ); name = Models; @@ -2002,12 +1999,12 @@ DA7C28A314AF02B100491972 /* Data */ = { isa = PBXGroup; children = ( - DA34DA0F14B1BC7E00F721C1 /* OPElementEntity.h */, - DA34DA1014B1BC7E00F721C1 /* OPElementEntity.m */, - DA0A848A14C4DFCB0090EA8E /* OPElementGeneratedEntity.h */, - DA0A848B14C4DFCB0090EA8E /* OPElementGeneratedEntity.m */, - DA34DA0B14B1BC7D00F721C1 /* OPElementStoredEntity.h */, - DA34DA0C14B1BC7D00F721C1 /* OPElementStoredEntity.m */, + DA34DA0F14B1BC7E00F721C1 /* MPElementEntity.h */, + DA34DA1014B1BC7E00F721C1 /* MPElementEntity.m */, + DA0A848A14C4DFCB0090EA8E /* MPElementGeneratedEntity.h */, + DA0A848B14C4DFCB0090EA8E /* MPElementGeneratedEntity.m */, + DA34DA0B14B1BC7D00F721C1 /* MPElementStoredEntity.h */, + DA34DA0C14B1BC7D00F721C1 /* MPElementStoredEntity.m */, ); name = Data; sourceTree = ""; @@ -2663,7 +2660,6 @@ DAA3B81514CDD0C100F35AF6 /* jquery-1.6.1.min.js in Resources */, DA5BFA55147E415C00F98B1E /* InfoPlist.strings in Resources */, DA7974C214C8C98500A71457 /* MainStoryboard_iPhone.storyboard in Resources */, - DA7974C414C8C98C00A71457 /* MainStoryboard_iPad.storyboard in Resources */, DA007F5514B25EE100251337 /* ciphers.plist in Resources */, DA5DB7A614BE4B19002DD256 /* Default.png in Resources */, DA5DB7A814BE4B4B002DD256 /* Default@2x.png in Resources */, @@ -3256,20 +3252,20 @@ buildActionMask = 2147483647; files = ( DA5BFA57147E415C00F98B1E /* main.m in Sources */, - DA5BFA5B147E415C00F98B1E /* OPAppDelegate.m in Sources */, + DA5BFA5B147E415C00F98B1E /* MPAppDelegate.m in Sources */, DA5BFA64147E415C00F98B1E /* MasterPassword.xcdatamodeld in Sources */, - DA5BFA67147E415C00F98B1E /* OPMainViewController.m in Sources */, - DAE2C648148247E500BA6B10 /* OPTypeViewController.m in Sources */, - DAC781361482E67300BCF976 /* OPRecentViewController.m in Sources */, - DA34DA0D14B1BC7D00F721C1 /* OPElementStoredEntity.m in Sources */, - DA34DA1114B1BC7E00F721C1 /* OPElementEntity.m in Sources */, - DA34DA1614B1BEA100F721C1 /* OPTypes.m in Sources */, - DA007F5214B24DCD00251337 /* OPConfig.m in Sources */, - DA55B29E14B38272001131B7 /* OPContentViewController.m in Sources */, - DA55B2A214B4EB47001131B7 /* OPSearchDelegate.m in Sources */, - DA0A848C14C4DFCB0090EA8E /* OPElementGeneratedEntity.m in Sources */, + DA5BFA67147E415C00F98B1E /* MPMainViewController.m in Sources */, + DAE2C648148247E500BA6B10 /* MPTypeViewController.m in Sources */, + DAC781361482E67300BCF976 /* MPRecentViewController.m in Sources */, + DA34DA0D14B1BC7D00F721C1 /* MPElementStoredEntity.m in Sources */, + DA34DA1114B1BC7E00F721C1 /* MPElementEntity.m in Sources */, + DA55B29E14B38272001131B7 /* MPContentViewController.m in Sources */, + DA55B2A214B4EB47001131B7 /* MPSearchDelegate.m in Sources */, + DA0A848C14C4DFCB0090EA8E /* MPElementGeneratedEntity.m in Sources */, DAA3B81414CDC77100F35AF6 /* jquery-1.6.1.min.js in Sources */, - DA65570614D731F000841C99 /* OPGuideViewController.m in Sources */, + DA65570614D731F000841C99 /* MPGuideViewController.m in Sources */, + DA95D5FD14DF295F008D1B94 /* MPConfig.m in Sources */, + DA95D5FE14DF295F008D1B94 /* MPTypes.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/MasterPassword/OPAppDelegate.h b/MasterPassword/MPAppDelegate.h similarity index 90% rename from MasterPassword/OPAppDelegate.h rename to MasterPassword/MPAppDelegate.h index 552a6e4c..78395164 100644 --- a/MasterPassword/OPAppDelegate.h +++ b/MasterPassword/MPAppDelegate.h @@ -1,5 +1,5 @@ // -// OPAppDelegate.h +// MPAppDelegate.h // MasterPassword // // Created by Maarten Billemont on 24/11/11. @@ -8,7 +8,7 @@ #import -@interface OPAppDelegate : AbstractAppDelegate +@interface MPAppDelegate : AbstractAppDelegate @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; @@ -17,7 +17,7 @@ @property (strong, nonatomic) NSData *keyPhraseHash; @property (strong, nonatomic) NSString *keyPhraseHashHex; -+ (OPAppDelegate *)get; ++ (MPAppDelegate *)get; + (NSManagedObjectModel *)managedObjectModel; + (NSManagedObjectContext *)managedObjectContext; diff --git a/MasterPassword/OPAppDelegate.m b/MasterPassword/MPAppDelegate.m similarity index 93% rename from MasterPassword/OPAppDelegate.m rename to MasterPassword/MPAppDelegate.m index 519e7cf2..358b422a 100644 --- a/MasterPassword/OPAppDelegate.m +++ b/MasterPassword/MPAppDelegate.m @@ -1,17 +1,17 @@ // -// OPAppDelegate.m +// MPAppDelegate.m // MasterPassword // // Created by Maarten Billemont on 24/11/11. // Copyright (c) 2011 Lyndir. All rights reserved. // -#import "OPAppDelegate.h" +#import "MPAppDelegate.h" -#import "OPMainViewController.h" +#import "MPMainViewController.h" #import "IASKSettingsReader.h" -@interface OPAppDelegate () +@interface MPAppDelegate () + (NSDictionary *)keyPhraseQuery; + (NSDictionary *)keyPhraseHashQuery; @@ -22,7 +22,7 @@ @end -@implementation OPAppDelegate +@implementation MPAppDelegate @synthesize managedObjectModel = __managedObjectModel; @synthesize managedObjectContext = __managedObjectContext; @@ -42,26 +42,26 @@ + (NSDictionary *)keyPhraseQuery { - static NSDictionary *OPKeyPhraseQuery = nil; - if (!OPKeyPhraseQuery) - OPKeyPhraseQuery = [KeyChain createQueryForClass:kSecClassGenericPassword + static NSDictionary *MPKeyPhraseQuery = nil; + if (!MPKeyPhraseQuery) + MPKeyPhraseQuery = [KeyChain createQueryForClass:kSecClassGenericPassword attributes:[NSDictionary dictionaryWithObject:@"MasterPassword" forKey:(__bridge id)kSecAttrService] matches:nil]; - return OPKeyPhraseQuery; + return MPKeyPhraseQuery; } + (NSDictionary *)keyPhraseHashQuery { - static NSDictionary *OPKeyPhraseHashQuery = nil; - if (!OPKeyPhraseHashQuery) - OPKeyPhraseHashQuery = [KeyChain createQueryForClass:kSecClassGenericPassword + static NSDictionary *MPKeyPhraseHashQuery = nil; + if (!MPKeyPhraseHashQuery) + MPKeyPhraseHashQuery = [KeyChain createQueryForClass:kSecClassGenericPassword attributes:[NSDictionary dictionaryWithObject:@"MasterPasswordHash" forKey:(__bridge id)kSecAttrService] matches:nil]; - return OPKeyPhraseHashQuery; + return MPKeyPhraseHashQuery; } - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { @@ -134,7 +134,7 @@ } - (void)applicationDidBecomeActive:(UIApplication *)application { - if ([[OPConfig get].showQuickStart boolValue]) + if ([[MPConfig get].showQuickStart boolValue]) [self showGuide]; else [self loadKeyPhrase]; @@ -142,12 +142,12 @@ - (void)showGuide { - [self.navigationController performSegueWithIdentifier:@"OP_Guide" sender:self]; + [self.navigationController performSegueWithIdentifier:@"MP_Guide" sender:self]; } - (void)loadKeyPhrase { - if ([[OPConfig get].forgetKeyPhrase boolValue]) { + if ([[MPConfig get].forgetKeyPhrase boolValue]) { [self forgetKeyPhrase]; return; } @@ -175,23 +175,23 @@ if (buttonIndex == [alert firstOtherButtonIndex]) { // Key phrase reset. Delete it. dbg(@"Deleting master key phrase and hash from key chain."); - [KeyChain deleteItemForQuery:[OPAppDelegate keyPhraseQuery]]; - [KeyChain deleteItemForQuery:[OPAppDelegate keyPhraseHashQuery]]; + [KeyChain deleteItemForQuery:[MPAppDelegate keyPhraseQuery]]; + [KeyChain deleteItemForQuery:[MPAppDelegate keyPhraseHashQuery]]; } [self loadKeyPhrase]; } cancelTitle:[PearlStrings get].commonButtonAbort otherTitles:[PearlStrings get].commonButtonContinue, nil]; - [OPConfig get].forgetKeyPhrase = [NSNumber numberWithBool:NO]; + [MPConfig get].forgetKeyPhrase = [NSNumber numberWithBool:NO]; } - (void)loadStoredKeyPhrase { - if ([[OPConfig get].storeKeyPhrase boolValue]) { + if ([[MPConfig get].storeKeyPhrase boolValue]) { // Key phrase is stored in keychain. Load it. dbg(@"Loading master key phrase from key chain."); - NSData *keyPhraseData = [KeyChain dataOfItemForQuery:[OPAppDelegate keyPhraseQuery]]; + NSData *keyPhraseData = [KeyChain dataOfItemForQuery:[MPAppDelegate keyPhraseQuery]]; dbg(@" -> Master key phrase %@.", keyPhraseData? @"found": @"NOT found"); self.keyPhrase = keyPhraseData? [[NSString alloc] initWithBytes:keyPhraseData.bytes length:keyPhraseData.length @@ -199,14 +199,14 @@ } else { // Key phrase should not be stored in keychain. Delete it. dbg(@"Deleting master key phrase from key chain."); - [KeyChain deleteItemForQuery:[OPAppDelegate keyPhraseQuery]]; + [KeyChain deleteItemForQuery:[MPAppDelegate keyPhraseQuery]]; } } - (void)askKeyPhrase { dispatch_async(dispatch_get_main_queue(), ^{ - NSData *keyPhraseHash = [KeyChain dataOfItemForQuery:[OPAppDelegate keyPhraseHashQuery]]; + NSData *keyPhraseHash = [KeyChain dataOfItemForQuery:[MPAppDelegate keyPhraseHashQuery]]; dbg(@"Key phrase hash %@.", keyPhraseHash? @"known": @"NOT known"); [AlertViewController showAlertWithTitle:@"Master Password" @@ -259,7 +259,7 @@ [self saveContext]; - if (![[OPConfig get].rememberKeyPhrase boolValue]) + if (![[MPConfig get].rememberKeyPhrase boolValue]) self.keyPhrase = nil; } @@ -268,19 +268,19 @@ [self saveContext]; } -+ (OPAppDelegate *)get { ++ (MPAppDelegate *)get { - return (OPAppDelegate *)[super get]; + return (MPAppDelegate *)[super get]; } + (NSManagedObjectContext *)managedObjectContext { - return [(OPAppDelegate *)[UIApplication sharedApplication].delegate managedObjectContext]; + return [(MPAppDelegate *)[UIApplication sharedApplication].delegate managedObjectContext]; } + (NSManagedObjectModel *)managedObjectModel { - return [(OPAppDelegate *)[UIApplication sharedApplication].delegate managedObjectModel]; + return [(MPAppDelegate *)[UIApplication sharedApplication].delegate managedObjectModel]; } - (void)saveContext { @@ -301,14 +301,14 @@ self.keyPhraseHashHex = [self.keyPhraseHash encodeHex]; dbg(@"Updating master key phrase hash to: %@.", self.keyPhraseHashHex); - [KeyChain addOrUpdateItemForQuery:[OPAppDelegate keyPhraseHashQuery] + [KeyChain addOrUpdateItemForQuery:[MPAppDelegate keyPhraseHashQuery] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: self.keyPhraseHash, (__bridge id)kSecValueData, kSecAttrAccessibleWhenUnlocked, (__bridge id)kSecAttrAccessible, nil]]; - if ([[OPConfig get].storeKeyPhrase boolValue]) { + if ([[MPConfig get].storeKeyPhrase boolValue]) { dbg(@"Storing master key phrase in key chain."); - [KeyChain addOrUpdateItemForQuery:[OPAppDelegate keyPhraseQuery] + [KeyChain addOrUpdateItemForQuery:[MPAppDelegate keyPhraseQuery] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [keyPhrase dataUsingEncoding:NSUTF8StringEncoding], (__bridge id)kSecValueData, kSecAttrAccessibleWhenUnlocked, (__bridge id)kSecAttrAccessible, @@ -343,7 +343,7 @@ [__managedObjectContext mergeChangesFromContextDidSaveNotification:note]; [[NSNotificationCenter defaultCenter] postNotification: - [NSNotification notificationWithName:OPPersistentStoreDidChangeNotification + [NSNotification notificationWithName:UIScreenModeDidChangeNotification object:self userInfo:[note userInfo]]]; }]; }]; diff --git a/MasterPassword/OPConfig.h b/MasterPassword/MPConfig.h similarity index 88% rename from MasterPassword/OPConfig.h rename to MasterPassword/MPConfig.h index a721d075..80362954 100644 --- a/MasterPassword/OPConfig.h +++ b/MasterPassword/MPConfig.h @@ -1,12 +1,12 @@ // -// OPConfig.h +// MPConfig.h // MasterPassword // // Created by Maarten Billemont on 02/01/12. // Copyright (c) 2012 Lyndir. All rights reserved. // -@interface OPConfig : Config +@interface MPConfig : Config @property (nonatomic, retain) NSNumber *dataStoreError; @property (nonatomic, retain) NSNumber *storeKeyPhrase; @@ -15,6 +15,6 @@ @property (nonatomic, retain) NSNumber *helpHidden; @property (nonatomic, retain) NSNumber *showQuickStart; -+ (OPConfig *)get; ++ (MPConfig *)get; @end diff --git a/MasterPassword/OPConfig.m b/MasterPassword/MPConfig.m similarity index 92% rename from MasterPassword/OPConfig.m rename to MasterPassword/MPConfig.m index d812083c..581589a3 100644 --- a/MasterPassword/OPConfig.m +++ b/MasterPassword/MPConfig.m @@ -1,14 +1,14 @@ // -// OPConfig.m +// MPConfig.m // MasterPassword // // Created by Maarten Billemont on 02/01/12. // Copyright (c) 2012 Lyndir. All rights reserved. // -#import "OPConfig.h" +#import "MPConfig.h" -@implementation OPConfig +@implementation MPConfig @dynamic dataStoreError, storeKeyPhrase, rememberKeyPhrase, forgetKeyPhrase, helpHidden, showQuickStart; @@ -30,9 +30,9 @@ return self; } -+ (OPConfig *)get { ++ (MPConfig *)get { - return (OPConfig *)[super get]; + return (MPConfig *)[super get]; } @end diff --git a/MasterPassword/MPContentViewController.h b/MasterPassword/MPContentViewController.h new file mode 100644 index 00000000..301f4771 --- /dev/null +++ b/MasterPassword/MPContentViewController.h @@ -0,0 +1,16 @@ +// +// MPContentViewController.h +// MasterPassword +// +// Created by Maarten Billemont on 03/01/12. +// Copyright (c) 2012 Lyndir. All rights reserved. +// + +#import +#import "MPElementEntity.h" + +@interface MPContentViewController : UIViewController + +@property (nonatomic, weak) MPElementEntity *activeElement; + +@end diff --git a/MasterPassword/OPContentViewController.m b/MasterPassword/MPContentViewController.m similarity index 80% rename from MasterPassword/OPContentViewController.m rename to MasterPassword/MPContentViewController.m index a90a1629..d4532b9e 100644 --- a/MasterPassword/OPContentViewController.m +++ b/MasterPassword/MPContentViewController.m @@ -1,14 +1,14 @@ // -// OPContentViewController.m +// MPContentViewController.m // MasterPassword // // Created by Maarten Billemont on 03/01/12. // Copyright (c) 2012 Lyndir. All rights reserved. // -#import "OPContentViewController.h" +#import "MPContentViewController.h" -@implementation OPContentViewController +@implementation MPContentViewController @synthesize activeElement = _activeElement; #pragma mark - View lifecycle diff --git a/MasterPassword/OPElementEntity.h b/MasterPassword/MPElementEntity.h similarity index 88% rename from MasterPassword/OPElementEntity.h rename to MasterPassword/MPElementEntity.h index 21bb93d8..c92fcca2 100644 --- a/MasterPassword/OPElementEntity.h +++ b/MasterPassword/MPElementEntity.h @@ -1,5 +1,5 @@ // -// OPElementEntity.h +// MPElementEntity.h // MasterPassword // // Created by Maarten Billemont on 02/01/12. @@ -10,7 +10,7 @@ #import -@interface OPElementEntity : NSManagedObject +@interface MPElementEntity : NSManagedObject @property (nonatomic, retain) NSString *name; @property (nonatomic, retain) NSString *mpHashHex; diff --git a/MasterPassword/OPElementEntity.m b/MasterPassword/MPElementEntity.m similarity index 90% rename from MasterPassword/OPElementEntity.m rename to MasterPassword/MPElementEntity.m index b64b3643..960b93fa 100644 --- a/MasterPassword/OPElementEntity.m +++ b/MasterPassword/MPElementEntity.m @@ -1,15 +1,15 @@ // -// OPElementEntity.m +// MPElementEntity.m // MasterPassword // // Created by Maarten Billemont on 02/01/12. // Copyright (c) 2012 Lyndir. All rights reserved. // -#import "OPElementEntity.h" +#import "MPElementEntity.h" -@implementation OPElementEntity +@implementation MPElementEntity @dynamic name; @dynamic mpHashHex; diff --git a/MasterPassword/OPElementGeneratedEntity.h b/MasterPassword/MPElementGeneratedEntity.h similarity index 68% rename from MasterPassword/OPElementGeneratedEntity.h rename to MasterPassword/MPElementGeneratedEntity.h index 931e41c0..832ca61b 100644 --- a/MasterPassword/OPElementGeneratedEntity.h +++ b/MasterPassword/MPElementGeneratedEntity.h @@ -1,5 +1,5 @@ // -// OPElementGeneratedEntity.h +// MPElementGeneratedEntity.h // MasterPassword // // Created by Maarten Billemont on 16/01/12. @@ -8,10 +8,10 @@ #import #import -#import "OPElementEntity.h" +#import "MPElementEntity.h" -@interface OPElementGeneratedEntity : OPElementEntity +@interface MPElementGeneratedEntity : MPElementEntity @property (nonatomic, assign) int16_t counter; diff --git a/MasterPassword/OPElementGeneratedEntity.m b/MasterPassword/MPElementGeneratedEntity.m similarity index 60% rename from MasterPassword/OPElementGeneratedEntity.m rename to MasterPassword/MPElementGeneratedEntity.m index 976f28d3..baac8c25 100644 --- a/MasterPassword/OPElementGeneratedEntity.m +++ b/MasterPassword/MPElementGeneratedEntity.m @@ -1,28 +1,28 @@ // -// OPElementGeneratedEntity.m +// MPElementGeneratedEntity.m // MasterPassword // // Created by Maarten Billemont on 16/01/12. // Copyright (c) 2012 Lyndir. All rights reserved. // -#import "OPElementGeneratedEntity.h" -#import "OPAppDelegate.h" +#import "MPElementGeneratedEntity.h" +#import "MPAppDelegate.h" -@implementation OPElementGeneratedEntity +@implementation MPElementGeneratedEntity @dynamic counter; - (id)content { - assert(self.type & OPElementTypeClassCalculated); + assert(self.type & MPElementTypeClassCalculated); if (![self.name length]) return nil; - if (self.type & OPElementTypeClassCalculated) - return OPCalculateContent(self.type, self.name, [OPAppDelegate get].keyPhrase, self.counter); + if (self.type & MPElementTypeClassCalculated) + return MPCalculateContent(self.type, self.name, [MPAppDelegate get].keyPhrase, self.counter); @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:[NSString stringWithFormat:@"Unsupported type: %d", self.type] userInfo:nil]; diff --git a/MasterPassword/OPElementStoredEntity.h b/MasterPassword/MPElementStoredEntity.h similarity index 70% rename from MasterPassword/OPElementStoredEntity.h rename to MasterPassword/MPElementStoredEntity.h index e86a6287..e29009d9 100644 --- a/MasterPassword/OPElementStoredEntity.h +++ b/MasterPassword/MPElementStoredEntity.h @@ -1,5 +1,5 @@ // -// OPElementStoredEntity.h +// MPElementStoredEntity.h // MasterPassword // // Created by Maarten Billemont on 02/01/12. @@ -8,10 +8,10 @@ #import #import -#import "OPElementEntity.h" +#import "MPElementEntity.h" -@interface OPElementStoredEntity : OPElementEntity +@interface MPElementStoredEntity : MPElementEntity @property (nonatomic, retain, readwrite) id content; diff --git a/MasterPassword/OPElementStoredEntity.m b/MasterPassword/MPElementStoredEntity.m similarity index 79% rename from MasterPassword/OPElementStoredEntity.m rename to MasterPassword/MPElementStoredEntity.m index fd03f00f..c575ca83 100644 --- a/MasterPassword/OPElementStoredEntity.m +++ b/MasterPassword/MPElementStoredEntity.m @@ -1,21 +1,21 @@ // -// OPElementStoredEntity.m +// MPElementStoredEntity.m // MasterPassword // // Created by Maarten Billemont on 02/01/12. // Copyright (c) 2012 Lyndir. All rights reserved. // -#import "OPElementStoredEntity.h" -#import "OPAppDelegate.h" +#import "MPElementStoredEntity.h" +#import "MPAppDelegate.h" -@interface OPElementStoredEntity () +@interface MPElementStoredEntity () @property (nonatomic, retain, readwrite) id contentObject; @end -@implementation OPElementStoredEntity +@implementation MPElementStoredEntity @dynamic contentObject; @@ -31,15 +31,15 @@ - (id)content { - assert(self.type & OPElementTypeClassStored); + assert(self.type & MPElementTypeClassStored); NSData *encryptedContent; - if (self.type == OPElementTypeStoredDevicePrivate) - encryptedContent = [KeyChain dataOfItemForQuery:[OPElementStoredEntity queryForDevicePrivateElementNamed:self.name]]; + if (self.type == MPElementTypeStoredDevicePrivate) + encryptedContent = [KeyChain dataOfItemForQuery:[MPElementStoredEntity queryForDevicePrivateElementNamed:self.name]]; else encryptedContent = self.contentObject; - NSData *decryptedContent = [encryptedContent decryptWithSymmetricKey:[[OPAppDelegate get].keyPhrase + NSData *decryptedContent = [encryptedContent decryptWithSymmetricKey:[[MPAppDelegate get].keyPhrase dataUsingEncoding:NSUTF8StringEncoding] usePadding:YES]; return [[NSString alloc] initWithBytes:decryptedContent.bytes length:decryptedContent.length encoding:NSUTF8StringEncoding]; @@ -47,12 +47,12 @@ - (void)setContent:(id)content { - NSData *encryptedContent = [[content description] encryptWithSymmetricKey:[[OPAppDelegate get].keyPhrase + NSData *encryptedContent = [[content description] encryptWithSymmetricKey:[[MPAppDelegate get].keyPhrase dataUsingEncoding:NSUTF8StringEncoding] usePadding:YES]; - if (self.type == OPElementTypeStoredDevicePrivate) { - [KeyChain addOrUpdateItemForQuery:[OPElementStoredEntity queryForDevicePrivateElementNamed:self.name] + if (self.type == MPElementTypeStoredDevicePrivate) { + [KeyChain addOrUpdateItemForQuery:[MPElementStoredEntity queryForDevicePrivateElementNamed:self.name] withAttributes:[NSDictionary dictionaryWithObjectsAndKeys: encryptedContent, (__bridge id)kSecValueData, kSecAttrAccessibleWhenUnlockedThisDeviceOnly, (__bridge id)kSecAttrAccessible, diff --git a/MasterPassword/OPGuideViewController.h b/MasterPassword/MPGuideViewController.h similarity index 75% rename from MasterPassword/OPGuideViewController.h rename to MasterPassword/MPGuideViewController.h index 8d4530d2..215ebf6b 100644 --- a/MasterPassword/OPGuideViewController.h +++ b/MasterPassword/MPGuideViewController.h @@ -1,5 +1,5 @@ // -// OPGuideViewController.h +// MPGuideViewController.h // MasterPassword // // Created by Maarten Billemont on 30/01/12. @@ -8,7 +8,7 @@ #import -@interface OPGuideViewController : UIViewController +@interface MPGuideViewController : UIViewController @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; diff --git a/MasterPassword/OPGuideViewController.m b/MasterPassword/MPGuideViewController.m similarity index 75% rename from MasterPassword/OPGuideViewController.m rename to MasterPassword/MPGuideViewController.m index 36690d8e..2bd8cbbb 100644 --- a/MasterPassword/OPGuideViewController.m +++ b/MasterPassword/MPGuideViewController.m @@ -1,15 +1,15 @@ // -// OPGuideViewController.m +// MPGuideViewController.m // MasterPassword // // Created by Maarten Billemont on 30/01/12. // Copyright (c) 2012 Lyndir. All rights reserved. // -#import "OPGuideViewController.h" -#import "OPAppDelegate.h" +#import "MPGuideViewController.h" +#import "MPAppDelegate.h" -@implementation OPGuideViewController +@implementation MPGuideViewController @synthesize scrollView; - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { @@ -28,8 +28,8 @@ [super viewWillDisappear:animated]; - [OPConfig get].showQuickStart = [NSNumber numberWithBool:NO]; - [[OPAppDelegate get] loadKeyPhrase]; + [MPConfig get].showQuickStart = [NSNumber numberWithBool:NO]; + [[MPAppDelegate get] loadKeyPhrase]; } - (void)viewDidUnload { diff --git a/MasterPassword/OPMainViewController.h b/MasterPassword/MPMainViewController.h similarity index 80% rename from MasterPassword/OPMainViewController.h rename to MasterPassword/MPMainViewController.h index c72e0b4a..d949fb25 100644 --- a/MasterPassword/OPMainViewController.h +++ b/MasterPassword/MPMainViewController.h @@ -1,20 +1,20 @@ // -// OPMainViewController.h +// MPMainViewController.h // MasterPassword // // Created by Maarten Billemont on 24/11/11. // Copyright (c) 2011 Lyndir. All rights reserved. // -#import "OPTypeViewController.h" -#import "OPElementEntity.h" -#import "OPSearchDelegate.h" +#import "MPTypeViewController.h" +#import "MPElementEntity.h" +#import "MPSearchDelegate.h" #import "IASKAppSettingsViewController.h" -@interface OPMainViewController : UIViewController +@interface MPMainViewController : UIViewController -@property (strong, nonatomic) OPElementEntity *activeElement; -@property (strong, nonatomic) IBOutlet OPSearchDelegate *searchResultsController; +@property (strong, nonatomic) MPElementEntity *activeElement; +@property (strong, nonatomic) IBOutlet MPSearchDelegate *searchResultsController; @property (weak, nonatomic) IBOutlet UITextField *contentField; @property (weak, nonatomic) IBOutlet UIButton *typeButton; @property (weak, nonatomic) IBOutlet UIWebView *helpView; diff --git a/MasterPassword/OPMainViewController.m b/MasterPassword/MPMainViewController.m similarity index 86% rename from MasterPassword/OPMainViewController.m rename to MasterPassword/MPMainViewController.m index df4a8758..0b09d9ab 100644 --- a/MasterPassword/OPMainViewController.m +++ b/MasterPassword/MPMainViewController.m @@ -1,22 +1,22 @@ // -// OPMainViewController.m +// MPMainViewController.m // MasterPassword // // Created by Maarten Billemont on 24/11/11. // Copyright (c) 2011 Lyndir. All rights reserved. // -#import "OPMainViewController.h" -#import "OPAppDelegate.h" -#import "OPContentViewController.h" -#import "OPElementGeneratedEntity.h" -#import "OPElementStoredEntity.h" +#import "MPMainViewController.h" +#import "MPAppDelegate.h" +#import "MPContentViewController.h" +#import "MPElementGeneratedEntity.h" +#import "MPElementStoredEntity.h" #import "IASKAppSettingsViewController.h" #import -@interface OPMainViewController (Private) +@interface MPMainViewController (Private) - (void)updateAnimated:(BOOL)animated; - (void)updateWasAnimated:(BOOL)animated; @@ -26,7 +26,7 @@ @end -@implementation OPMainViewController +@implementation MPMainViewController @synthesize activeElement = _activeElement; @synthesize searchResultsController = _searchResultsController; @synthesize typeButton = _typeButton; @@ -55,10 +55,10 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - if ([[segue identifier] isEqualToString:@"OP_Main_ChooseType"]) + if ([[segue identifier] isEqualToString:@"MP_Main_ChooseType"]) [[segue destinationViewController] setDelegate:self]; - if ([[segue identifier] isEqualToString:@"OP_Main_Content"]) - ((OPContentViewController *)[segue destinationViewController]).activeElement = self.activeElement; + if ([[segue identifier] isEqualToString:@"MP_Main_Content"]) + ((MPContentViewController *)[segue destinationViewController]).activeElement = self.activeElement; } - (void)viewWillAppear:(BOOL)animated { @@ -72,7 +72,7 @@ self.searchTipContainer.alpha = 1; }]; - [self setHelpHidden:[[OPConfig get].helpHidden boolValue] animated:animated]; + [self setHelpHidden:[[MPConfig get].helpHidden boolValue] animated:animated]; [self updateAnimated:animated]; } @@ -104,14 +104,14 @@ [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillResignActiveNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { - if (![OPAppDelegate get].keyPhrase) { + if (![MPAppDelegate get].keyPhrase) { self.activeElement = nil; [self updateAnimated:NO]; } }]; [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { - if (![OPAppDelegate get].keyPhrase) { + if (![MPAppDelegate get].keyPhrase) { self.activeElement = nil; [self updateAnimated:NO]; } @@ -153,7 +153,7 @@ - (void)updateAnimated:(BOOL)animated { - [[OPAppDelegate get] saveContext]; + [[MPAppDelegate get] saveContext]; if (animated) [UIView animateWithDuration:0.2 animations:^{ @@ -168,18 +168,18 @@ [self setHelpChapter:self.activeElement? @"2": @"1"]; self.siteName.text = self.activeElement.name; - self.passwordCounter.alpha = self.activeElement.type & OPElementTypeClassCalculated? 0.5f: 0; - self.passwordIncrementer.alpha = self.activeElement.type & OPElementTypeClassCalculated? 0.5f: 0; - self.passwordEdit.alpha = self.activeElement.type & OPElementTypeClassStored? 0.5f: 0; + self.passwordCounter.alpha = self.activeElement.type & MPElementTypeClassCalculated? 0.5f: 0; + self.passwordIncrementer.alpha = self.activeElement.type & MPElementTypeClassCalculated? 0.5f: 0; + self.passwordEdit.alpha = self.activeElement.type & MPElementTypeClassStored? 0.5f: 0; - [self.typeButton setTitle:NSStringFromOPElementType(self.activeElement.type) + [self.typeButton setTitle:NSStringFromMPElementType(self.activeElement.type) forState:UIControlStateNormal]; - self.typeButton.alpha = NSStringFromOPElementType(self.activeElement.type).length? 1: 0; + self.typeButton.alpha = NSStringFromMPElementType(self.activeElement.type).length? 1: 0; self.contentField.enabled = NO; - if ([self.activeElement isKindOfClass:[OPElementGeneratedEntity class]]) - self.passwordCounter.text = [NSString stringWithFormat:@"%d", ((OPElementGeneratedEntity *) self.activeElement).counter]; + if ([self.activeElement isKindOfClass:[MPElementGeneratedEntity class]]) + self.passwordCounter.text = [NSString stringWithFormat:@"%d", ((MPElementGeneratedEntity *) self.activeElement).counter]; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ NSString *description = self.activeElement.description; @@ -207,11 +207,11 @@ if (hidden) { self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 373); self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, 415); - [OPConfig get].helpHidden = [NSNumber numberWithBool:YES]; + [MPConfig get].helpHidden = [NSNumber numberWithBool:YES]; } else { self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 175); self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, 216); - [OPConfig get].helpHidden = [NSNumber numberWithBool:NO]; + [MPConfig get].helpHidden = [NSNumber numberWithBool:NO]; } }]; } @@ -223,7 +223,7 @@ [NSURL URLWithString:[NSString stringWithFormat:@"#%@", chapter] relativeToURL: [[NSBundle mainBundle] URLForResource:@"help" withExtension:@"html"]]]]; [self.helpView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"setClass('%@');", - ClassNameFromOPElementType(self.activeElement.type)]]; + ClassNameFromMPElementType(self.activeElement.type)]]; } - (void)showContentTip:(NSString *)message withIcon:(UIImageView *)icon { @@ -280,12 +280,12 @@ - (IBAction)incrementPasswordCounter { - if (![self.activeElement isKindOfClass:[OPElementGeneratedEntity class]]) + if (![self.activeElement isKindOfClass:[MPElementGeneratedEntity class]]) // Not of a type that supports a password counter; return; [self updateElement:^{ - ++((OPElementGeneratedEntity *) self.activeElement).counter; + ++((MPElementGeneratedEntity *) self.activeElement).counter; }]; } @@ -307,7 +307,7 @@ - (IBAction)editPassword { - if (self.activeElement.type & OPElementTypeClassStored) { + if (self.activeElement.type & MPElementTypeClassStored) { self.contentField.enabled = YES; [self.contentField becomeFirstResponder]; } @@ -338,7 +338,7 @@ [self setHelpHidden:NO animated:YES]; break; case 2: - [[OPAppDelegate get] showGuide]; + [[MPAppDelegate get] showGuide]; break; case 3: { IASKAppSettingsViewController *settingsVC = [IASKAppSettingsViewController new]; @@ -351,32 +351,32 @@ otherTitles:[self isHelpVisible]? @"Hide Help": @"Show Help", @"FAQ", @"Tutorial", @"Settings", nil]; } -- (void)didSelectType:(OPElementType)type { +- (void)didSelectType:(MPElementType)type { [self updateElement:^{ // Update password type. - if (ClassFromOPElementType(type) != ClassFromOPElementType(self.activeElement.type)) + if (ClassFromMPElementType(type) != ClassFromMPElementType(self.activeElement.type)) // Type requires a different class of element. Recreate the element. - [[OPAppDelegate managedObjectContext] performBlockAndWait:^{ - OPElementEntity *newElement = [NSEntityDescription insertNewObjectForEntityForName:ClassNameFromOPElementType(type) - inManagedObjectContext:[OPAppDelegate managedObjectContext]]; + [[MPAppDelegate managedObjectContext] performBlockAndWait:^{ + MPElementEntity *newElement = [NSEntityDescription insertNewObjectForEntityForName:ClassNameFromMPElementType(type) + inManagedObjectContext:[MPAppDelegate managedObjectContext]]; newElement.name = self.activeElement.name; newElement.mpHashHex = self.activeElement.mpHashHex; newElement.uses = self.activeElement.uses; newElement.lastUsed = self.activeElement.lastUsed; - [[OPAppDelegate managedObjectContext] deleteObject:self.activeElement]; + [[MPAppDelegate managedObjectContext] deleteObject:self.activeElement]; self.activeElement = newElement; }]; self.activeElement.type = type; - if (type & OPElementTypeClassStored && ![self.activeElement.description length]) + if (type & MPElementTypeClassStored && ![self.activeElement.description length]) [self showContentTip:@"Tap to set a password." withIcon:self.contentTipEditIcon]; }]; } -- (void)didSelectElement:(OPElementEntity *)element { +- (void)didSelectElement:(MPElementEntity *)element { self.activeElement = element; [self.activeElement use]; @@ -404,16 +404,16 @@ if (textField == self.contentField) { self.contentField.enabled = NO; - if (![self.activeElement isKindOfClass:[OPElementStoredEntity class]]) + if (![self.activeElement isKindOfClass:[MPElementStoredEntity class]]) // Not of a type whose content can be edited. return; - if ([((OPElementStoredEntity *) self.activeElement).content isEqual:self.contentField.text]) + if ([((MPElementStoredEntity *) self.activeElement).content isEqual:self.contentField.text]) // Content hasn't changed. return; [self updateElement:^{ - ((OPElementStoredEntity *) self.activeElement).content = self.contentField.text; + ((MPElementStoredEntity *) self.activeElement).content = self.contentField.text; }]; } } diff --git a/MasterPassword/OPRecentViewController.h b/MasterPassword/MPRecentViewController.h similarity index 72% rename from MasterPassword/OPRecentViewController.h rename to MasterPassword/MPRecentViewController.h index b28f6361..f1fe8c42 100644 --- a/MasterPassword/OPRecentViewController.h +++ b/MasterPassword/MPRecentViewController.h @@ -1,5 +1,5 @@ // -// OPRecentViewController.h +// MPRecentViewController.h // MasterPassword // // Created by Maarten Billemont on 27/11/11. @@ -8,7 +8,7 @@ #import -@interface OPRecentViewController : UITableViewController +@interface MPRecentViewController : UITableViewController @property(nonatomic,retain) IBOutlet UITableView *tableView; diff --git a/MasterPassword/OPRecentViewController.m b/MasterPassword/MPRecentViewController.m similarity index 75% rename from MasterPassword/OPRecentViewController.m rename to MasterPassword/MPRecentViewController.m index 98062d83..7bda51ce 100644 --- a/MasterPassword/OPRecentViewController.m +++ b/MasterPassword/MPRecentViewController.m @@ -1,14 +1,14 @@ // -// OPRecentViewController.m +// MPRecentViewController.m // MasterPassword // // Created by Maarten Billemont on 27/11/11. // Copyright (c) 2011 Lyndir. All rights reserved. // -#import "OPRecentViewController.h" +#import "MPRecentViewController.h" -@implementation OPRecentViewController +@implementation MPRecentViewController @dynamic tableView; - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation diff --git a/MasterPassword/OPSearchDelegate.h b/MasterPassword/MPSearchDelegate.h similarity index 64% rename from MasterPassword/OPSearchDelegate.h rename to MasterPassword/MPSearchDelegate.h index ce08f265..e9ab0b82 100644 --- a/MasterPassword/OPSearchDelegate.h +++ b/MasterPassword/MPSearchDelegate.h @@ -1,5 +1,5 @@ // -// OPSearchDelegate.h +// MPSearchDelegate.h // MasterPassword // // Created by Maarten Billemont on 04/01/12. @@ -7,19 +7,19 @@ // #import -#import "OPElementEntity.h" +#import "MPElementEntity.h" -@protocol OPSearchResultsDelegate +@protocol MPSearchResultsDelegate -- (void)didSelectElement:(OPElementEntity *)element; +- (void)didSelectElement:(MPElementEntity *)element; @end -@interface OPSearchDelegate : NSObject +@interface MPSearchDelegate : NSObject @property (strong, nonatomic) NSFetchedResultsController *fetchedResultsController; -@property (weak, nonatomic) IBOutlet id delegate; +@property (weak, nonatomic) IBOutlet id delegate; @property (weak, nonatomic) IBOutlet UISearchDisplayController *searchDisplayController; @property (weak, nonatomic) IBOutlet UIView *searchTipContainer; diff --git a/MasterPassword/OPSearchDelegate.m b/MasterPassword/MPSearchDelegate.m similarity index 91% rename from MasterPassword/OPSearchDelegate.m rename to MasterPassword/MPSearchDelegate.m index c899ddab..a249becf 100644 --- a/MasterPassword/OPSearchDelegate.m +++ b/MasterPassword/MPSearchDelegate.m @@ -1,23 +1,23 @@ // -// OPSearchDelegate.m +// MPSearchDelegate.m // MasterPassword // // Created by Maarten Billemont on 04/01/12. // Copyright (c) 2012 Lyndir. All rights reserved. // -#import "OPSearchDelegate.h" -#import "OPAppDelegate.h" -#import "OPElementGeneratedEntity.h" +#import "MPSearchDelegate.h" +#import "MPAppDelegate.h" +#import "MPElementGeneratedEntity.h" -@interface OPSearchDelegate (Private) +@interface MPSearchDelegate (Private) - (void)configureCell:(UITableViewCell *)cell inTableView:(UITableView *)tableView atIndexPath:(NSIndexPath *)indexPath; - (void)update; @end -@implementation OPSearchDelegate +@implementation MPSearchDelegate @synthesize fetchedResultsController; @synthesize delegate; @synthesize searchDisplayController; @@ -42,7 +42,7 @@ - (void)searchDisplayController:(UISearchDisplayController *)controller didLoadSearchResultsTableView:(UITableView *)tableView { - [[NSNotificationCenter defaultCenter] addObserverForName:OPPersistentStoreDidChangeNotification + [[NSNotificationCenter defaultCenter] addObserverForName:UIScreenModeDidChangeNotification object:nil queue:nil usingBlock:^(NSNotification *note) { NSError *error; if (![self.fetchedResultsController performFetch:&error]) @@ -67,17 +67,17 @@ if (!query) query = @""; - NSFetchRequest *fetchRequest = [[OPAppDelegate get].managedObjectModel - fetchRequestFromTemplateWithName:@"OPSearchElement" + NSFetchRequest *fetchRequest = [[MPAppDelegate get].managedObjectModel + fetchRequestFromTemplateWithName:@"MPSearchElement" substitutionVariables:[NSDictionary dictionaryWithObjectsAndKeys: query, @"query", - [OPAppDelegate get].keyPhraseHashHex, @"mpHashHex", + [MPAppDelegate get].keyPhraseHashHex, @"mpHashHex", nil]]; [fetchRequest setSortDescriptors: [NSArray arrayWithObject:[[NSSortDescriptor alloc] initWithKey:@"uses" ascending:NO]]]; self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest - managedObjectContext:[OPAppDelegate managedObjectContext] + managedObjectContext:[MPAppDelegate managedObjectContext] sectionNameKeyPath:nil cacheName:nil]; self.fetchedResultsController.delegate = self; @@ -159,9 +159,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"OPElementSearch"]; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MPElementSearch"]; if (!cell) { - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"OPElementSearch"]; + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"MPElementSearch"]; UIImageView *backgroundImageView = [[UIImageView alloc] initWithImage:[[UIImage imageNamed:@"ui_list_middle"] resizableImageWithCapInsets:UIEdgeInsetsMake(5, 5, 5, 5)]]; backgroundImageView.frame = CGRectMake(-5, 0, 330, 34); UIView *backgroundView = [[UIView alloc] initWithFrame:cell.frame]; @@ -182,7 +182,7 @@ - (void)configureCell:(UITableViewCell *)cell inTableView:(UITableView *)tableView atIndexPath:(NSIndexPath *)indexPath { if (indexPath.section < [[self.fetchedResultsController sections] count]) { - OPElementEntity *element = [self.fetchedResultsController objectAtIndexPath:indexPath]; + MPElementEntity *element = [self.fetchedResultsController objectAtIndexPath:indexPath]; cell.textLabel.text = element.name; cell.detailTextLabel.text = [NSString stringWithFormat:@"%d", element.uses]; @@ -209,12 +209,12 @@ return; [self.fetchedResultsController.managedObjectContext performBlock:^{ - OPElementEntity *element = [NSEntityDescription insertNewObjectForEntityForName:NSStringFromClass([OPElementGeneratedEntity class]) + MPElementEntity *element = [NSEntityDescription insertNewObjectForEntityForName:NSStringFromClass([MPElementGeneratedEntity class]) inManagedObjectContext:self.fetchedResultsController.managedObjectContext]; - assert([element isKindOfClass:ClassFromOPElementType(element.type)]); + assert([element isKindOfClass:ClassFromMPElementType(element.type)]); element.name = siteName; - element.mpHashHex = [OPAppDelegate get].keyPhraseHashHex; + element.mpHashHex = [MPAppDelegate get].keyPhraseHashHex; dispatch_async(dispatch_get_main_queue(), ^{ [self.delegate didSelectElement:element]; @@ -250,7 +250,7 @@ if (editingStyle == UITableViewCellEditingStyleDelete) [self.fetchedResultsController.managedObjectContext performBlock:^{ - OPElementEntity *element = [self.fetchedResultsController objectAtIndexPath:indexPath]; + MPElementEntity *element = [self.fetchedResultsController objectAtIndexPath:indexPath]; [self.fetchedResultsController.managedObjectContext deleteObject:element]; }]; } diff --git a/MasterPassword/MPTypeViewController.h b/MasterPassword/MPTypeViewController.h new file mode 100644 index 00000000..b641df6a --- /dev/null +++ b/MasterPassword/MPTypeViewController.h @@ -0,0 +1,21 @@ +// +// MPTypeViewController.h +// MasterPassword +// +// Created by Maarten Billemont on 27/11/11. +// Copyright (c) 2011 Lyndir. All rights reserved. +// + +#import + +@protocol MPTypeDelegate + +- (void)didSelectType:(MPElementType)type; + +@end + +@interface MPTypeViewController : UITableViewController + +@property (nonatomic, weak) id delegate; + +@end diff --git a/MasterPassword/OPTypeViewController.m b/MasterPassword/MPTypeViewController.m similarity index 79% rename from MasterPassword/OPTypeViewController.m rename to MasterPassword/MPTypeViewController.m index 9b7c6033..9db9b6a7 100644 --- a/MasterPassword/OPTypeViewController.m +++ b/MasterPassword/MPTypeViewController.m @@ -1,14 +1,14 @@ // -// OPTypeViewController.m +// MPTypeViewController.m // MasterPassword // // Created by Maarten Billemont on 27/11/11. // Copyright (c) 2011 Lyndir. All rights reserved. // -#import "OPTypeViewController.h" +#import "MPTypeViewController.h" -@implementation OPTypeViewController +@implementation MPTypeViewController @synthesize delegate; #pragma mark - View lifecycle @@ -29,25 +29,25 @@ assert(self.navigationController.topViewController == self); - OPElementType type; + MPElementType type; switch (indexPath.section) { case 0: { // Calculated switch (indexPath.row) { case 0: - type = OPElementTypeCalculatedLong; + type = MPElementTypeCalculatedLong; break; case 1: - type = OPElementTypeCalculatedMedium; + type = MPElementTypeCalculatedMedium; break; case 2: - type = OPElementTypeCalculatedShort; + type = MPElementTypeCalculatedShort; break; case 3: - type = OPElementTypeCalculatedBasic; + type = MPElementTypeCalculatedBasic; break; case 4: - type = OPElementTypeCalculatedPIN; + type = MPElementTypeCalculatedPIN; break; default: @@ -61,10 +61,10 @@ // Stored switch (indexPath.row) { case 0: - type = OPElementTypeStoredPersonal; + type = MPElementTypeStoredPersonal; break; case 1: - type = OPElementTypeStoredDevicePrivate; + type = MPElementTypeStoredDevicePrivate; break; default: diff --git a/MasterPassword/MPTypes.h b/MasterPassword/MPTypes.h new file mode 100644 index 00000000..252023ae --- /dev/null +++ b/MasterPassword/MPTypes.h @@ -0,0 +1,38 @@ +// +// MPTypes.h +// MasterPassword +// +// Created by Maarten Billemont on 02/01/12. +// Copyright (c) 2012 Lyndir. All rights reserved. +// + +#import + +#define MPPersistentStoreDidChangeNotification @"MPPersistentStoreDidChange" + +typedef enum { + MPElementContentTypePassword, + MPElementContentTypeNote, + MPElementContentTypePicture, +} MPElementContentType; + +typedef enum { + MPElementTypeClassCalculated = 2 << 7, + MPElementTypeClassStored = 2 << 8, +} MPElementTypeClass; + +typedef enum { + MPElementTypeCalculatedLong = MPElementTypeClassCalculated | 0x01, + MPElementTypeCalculatedMedium = MPElementTypeClassCalculated | 0x02, + MPElementTypeCalculatedShort = MPElementTypeClassCalculated | 0x03, + MPElementTypeCalculatedBasic = MPElementTypeClassCalculated | 0x04, + MPElementTypeCalculatedPIN = MPElementTypeClassCalculated | 0x05, + + MPElementTypeStoredPersonal = MPElementTypeClassStored | 0x01, + MPElementTypeStoredDevicePrivate = MPElementTypeClassStored | 0x02, +} MPElementType; + +NSString *NSStringFromMPElementType(MPElementType type); +NSString *ClassNameFromMPElementType(MPElementType type); +Class ClassFromMPElementType(MPElementType type); +NSString *MPCalculateContent(MPElementType type, NSString *name, NSString *keyPhrase, int counter); diff --git a/MasterPassword/OPTypes.m b/MasterPassword/MPTypes.m similarity index 55% rename from MasterPassword/OPTypes.m rename to MasterPassword/MPTypes.m index 1cdc4a68..406ae498 100644 --- a/MasterPassword/OPTypes.m +++ b/MasterPassword/MPTypes.m @@ -1,41 +1,41 @@ // -// OPTypes.m +// MPTypes.m // MasterPassword // // Created by Maarten Billemont on 02/01/12. // Copyright (c) 2012 Lyndir. All rights reserved. // -#import "OPTypes.h" -#import "OPElementGeneratedEntity.h" -#import "OPElementStoredEntity.h" +#import "MPTypes.h" +#import "MPElementGeneratedEntity.h" +#import "MPElementStoredEntity.h" -NSString *NSStringFromOPElementType(OPElementType type) { +NSString *NSStringFromMPElementType(MPElementType type) { if (!type) return nil; switch (type) { - case OPElementTypeCalculatedLong: + case MPElementTypeCalculatedLong: return @"Long Password"; - case OPElementTypeCalculatedMedium: + case MPElementTypeCalculatedMedium: return @"Medium Password"; - case OPElementTypeCalculatedShort: + case MPElementTypeCalculatedShort: return @"Short Password"; - case OPElementTypeCalculatedBasic: + case MPElementTypeCalculatedBasic: return @"Basic Password"; - case OPElementTypeCalculatedPIN: + case MPElementTypeCalculatedPIN: return @"PIN"; - case OPElementTypeStoredPersonal: + case MPElementTypeStoredPersonal: return @"Personal Password"; - case OPElementTypeStoredDevicePrivate: + case MPElementTypeStoredDevicePrivate: return @"Device Private Password"; default: @@ -43,50 +43,50 @@ NSString *NSStringFromOPElementType(OPElementType type) { } } -Class ClassFromOPElementType(OPElementType type) { +Class ClassFromMPElementType(MPElementType type) { if (!type) return nil; switch (type) { - case OPElementTypeCalculatedLong: - return [OPElementGeneratedEntity class]; + case MPElementTypeCalculatedLong: + return [MPElementGeneratedEntity class]; - case OPElementTypeCalculatedMedium: - return [OPElementGeneratedEntity class]; + case MPElementTypeCalculatedMedium: + return [MPElementGeneratedEntity class]; - case OPElementTypeCalculatedShort: - return [OPElementGeneratedEntity class]; + case MPElementTypeCalculatedShort: + return [MPElementGeneratedEntity class]; - case OPElementTypeCalculatedBasic: - return [OPElementGeneratedEntity class]; + case MPElementTypeCalculatedBasic: + return [MPElementGeneratedEntity class]; - case OPElementTypeCalculatedPIN: - return [OPElementGeneratedEntity class]; + case MPElementTypeCalculatedPIN: + return [MPElementGeneratedEntity class]; - case OPElementTypeStoredPersonal: - return [OPElementStoredEntity class]; + case MPElementTypeStoredPersonal: + return [MPElementStoredEntity class]; - case OPElementTypeStoredDevicePrivate: - return [OPElementStoredEntity class]; + case MPElementTypeStoredDevicePrivate: + return [MPElementStoredEntity class]; default: [NSException raise:NSInternalInconsistencyException format:@"Type not supported: %d", type]; } } -NSString *ClassNameFromOPElementType(OPElementType type) { +NSString *ClassNameFromMPElementType(MPElementType type) { - return NSStringFromClass(ClassFromOPElementType(type)); + return NSStringFromClass(ClassFromMPElementType(type)); } -static NSDictionary *OPTypes_ciphers = nil; -NSString *OPCalculateContent(OPElementType type, NSString *name, NSString *keyPhrase, int counter) { +static NSDictionary *MPTypes_ciphers = nil; +NSString *MPCalculateContent(MPElementType type, NSString *name, NSString *keyPhrase, int counter) { - assert(type & OPElementTypeClassCalculated); + assert(type & MPElementTypeClassCalculated); - if (OPTypes_ciphers == nil) - OPTypes_ciphers = [NSDictionary dictionaryWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"ciphers" + if (MPTypes_ciphers == nil) + MPTypes_ciphers = [NSDictionary dictionaryWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"ciphers" withExtension:@"plist"]]; // Determine the hash whose bytes will be used for calculating a password: md4(name-keyPhrase) @@ -96,8 +96,8 @@ NSString *OPCalculateContent(OPElementType type, NSString *name, NSString *keyPh // Determine the cipher from the first hash byte. assert([keyHash length]); - NSArray *typeCiphers = [[OPTypes_ciphers valueForKey:ClassNameFromOPElementType(type)] - valueForKey:NSStringFromOPElementType(type)]; + NSArray *typeCiphers = [[MPTypes_ciphers valueForKey:ClassNameFromMPElementType(type)] + valueForKey:NSStringFromMPElementType(type)]; NSString *cipher = [typeCiphers objectAtIndex:keyBytes[0] % [typeCiphers count]]; // Encode the content, character by character, using subsequent hash bytes and the cipher. @@ -106,7 +106,7 @@ NSString *OPCalculateContent(OPElementType type, NSString *name, NSString *keyPh for (NSUInteger c = 0; c < [cipher length]; ++c) { const char keyByte = keyBytes[c + 1]; NSString *cipherClass = [cipher substringWithRange:NSMakeRange(c, 1)]; - NSString *cipherClassCharacters = [[OPTypes_ciphers valueForKey:@"OPCharacterClasses"] valueForKey:cipherClass]; + NSString *cipherClassCharacters = [[MPTypes_ciphers valueForKey:@"MPCharacterClasses"] valueForKey:cipherClass]; [content appendString:[cipherClassCharacters substringWithRange:NSMakeRange(keyByte % [cipherClassCharacters length], 1)]]; } diff --git a/MasterPassword/MainStoryboard_iPad.storyboard b/MasterPassword/MainStoryboard_iPad.storyboard deleted file mode 100644 index 22c1fc3b..00000000 --- a/MasterPassword/MainStoryboard_iPad.storyboard +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/MasterPassword/MainStoryboard_iPhone.storyboard b/MasterPassword/MainStoryboard_iPhone.storyboard index bcdd0f1c..6cb9c68c 100644 --- a/MasterPassword/MainStoryboard_iPhone.storyboard +++ b/MasterPassword/MainStoryboard_iPhone.storyboard @@ -8,7 +8,7 @@ - + @@ -311,7 +311,7 @@ The passwords aren't saved anywhere. This is a major advantage: if you loose yo - + @@ -327,7 +327,7 @@ The passwords aren't saved anywhere. This is a major advantage: if you loose yo - + @@ -443,7 +443,7 @@ The passwords aren't saved anywhere. This is a major advantage: if you loose yo - + @@ -604,7 +604,7 @@ L4m3P4sSw0rD - + @@ -682,7 +682,7 @@ L4m3P4sSw0rD - + @@ -717,4 +717,4 @@ L4m3P4sSw0rD - \ No newline at end of file + diff --git a/MasterPassword/MasterPassword-Prefix.pch b/MasterPassword/MasterPassword-Prefix.pch index cab53c63..b05f46e8 100644 --- a/MasterPassword/MasterPassword-Prefix.pch +++ b/MasterPassword/MasterPassword-Prefix.pch @@ -22,5 +22,5 @@ #import "Pearl-Crypto.h" #import "Pearl-UIKit.h" -#import "OPTypes.h" -#import "OPConfig.h" +#import "MPTypes.h" +#import "MPConfig.h" diff --git a/MasterPassword/MasterPassword.xcdatamodeld/MasterPassword.xcdatamodel/contents b/MasterPassword/MasterPassword.xcdatamodeld/MasterPassword.xcdatamodel/contents index fb751c5c..fa0556cf 100644 --- a/MasterPassword/MasterPassword.xcdatamodeld/MasterPassword.xcdatamodel/contents +++ b/MasterPassword/MasterPassword.xcdatamodeld/MasterPassword.xcdatamodel/contents @@ -1,22 +1,22 @@ - + - + - + - + - - - + + + - \ No newline at end of file + diff --git a/MasterPassword/OPContentViewController.h b/MasterPassword/OPContentViewController.h deleted file mode 100644 index 3b30032a..00000000 --- a/MasterPassword/OPContentViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// OPContentViewController.h -// MasterPassword -// -// Created by Maarten Billemont on 03/01/12. -// Copyright (c) 2012 Lyndir. All rights reserved. -// - -#import -#import "OPElementEntity.h" - -@interface OPContentViewController : UIViewController - -@property (nonatomic, weak) OPElementEntity *activeElement; - -@end diff --git a/MasterPassword/OPTypeViewController.h b/MasterPassword/OPTypeViewController.h deleted file mode 100644 index 8d125c8c..00000000 --- a/MasterPassword/OPTypeViewController.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// OPTypeViewController.h -// MasterPassword -// -// Created by Maarten Billemont on 27/11/11. -// Copyright (c) 2011 Lyndir. All rights reserved. -// - -#import - -@protocol OPTypeDelegate - -- (void)didSelectType:(OPElementType)type; - -@end - -@interface OPTypeViewController : UITableViewController - -@property (nonatomic, weak) id delegate; - -@end diff --git a/MasterPassword/OPTypes.h b/MasterPassword/OPTypes.h deleted file mode 100644 index 26847c56..00000000 --- a/MasterPassword/OPTypes.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// OPTypes.h -// MasterPassword -// -// Created by Maarten Billemont on 02/01/12. -// Copyright (c) 2012 Lyndir. All rights reserved. -// - -#import - -#define OPPersistentStoreDidChangeNotification @"OPPersistentStoreDidChange" - -typedef enum { - OPElementContentTypePassword, - OPElementContentTypeNote, - OPElementContentTypePicture, -} OPElementContentType; - -typedef enum { - OPElementTypeClassCalculated = 2 << 7, - OPElementTypeClassStored = 2 << 8, -} OPElementTypeClass; - -typedef enum { - OPElementTypeCalculatedLong = OPElementTypeClassCalculated | 0x01, - OPElementTypeCalculatedMedium = OPElementTypeClassCalculated | 0x02, - OPElementTypeCalculatedShort = OPElementTypeClassCalculated | 0x03, - OPElementTypeCalculatedBasic = OPElementTypeClassCalculated | 0x04, - OPElementTypeCalculatedPIN = OPElementTypeClassCalculated | 0x05, - - OPElementTypeStoredPersonal = OPElementTypeClassStored | 0x01, - OPElementTypeStoredDevicePrivate = OPElementTypeClassStored | 0x02, -} OPElementType; - -NSString *NSStringFromOPElementType(OPElementType type); -NSString *ClassNameFromOPElementType(OPElementType type); -Class ClassFromOPElementType(OPElementType type); -NSString *OPCalculateContent(OPElementType type, NSString *name, NSString *keyPhrase, int counter); diff --git a/MasterPassword/Resources/help.html b/MasterPassword/Resources/help.html index a3d0e6fe..7d6b28e2 100644 --- a/MasterPassword/Resources/help.html +++ b/MasterPassword/Resources/help.html @@ -78,18 +78,18 @@ Tap it to copy the password. Once copied, you can switch to another application and paste it into a password field.

-

+

To change the password for this site, tap the edit icon .

Below the password you can set the password type. Some types create a password for you, others let you choose your own.

-

+

If the site complains when you try to set or update the password, try changing the password type.

-

+

To create another password for this site, you can increment the password counter . This is useful, for example, when you've had to share the password with somebody else.

diff --git a/MasterPassword/ciphers.plist b/MasterPassword/ciphers.plist index 9bb01f59..cca98fa9 100644 --- a/MasterPassword/ciphers.plist +++ b/MasterPassword/ciphers.plist @@ -2,7 +2,7 @@ - OPElementGeneratedEntity + MPElementGeneratedEntity Long Password @@ -30,7 +30,7 @@ nnnn - OPCharacterClasses + MPCharacterClasses V AEIOU diff --git a/MasterPassword/main.m b/MasterPassword/main.m index 4477526b..f0625145 100644 --- a/MasterPassword/main.m +++ b/MasterPassword/main.m @@ -8,11 +8,11 @@ #import -#import "OPAppDelegate.h" +#import "MPAppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([OPAppDelegate class])); + return UIApplicationMain(argc, argv, nil, NSStringFromClass([MPAppDelegate class])); } } diff --git a/MasterPassword/types.c b/MasterPassword/types.c deleted file mode 100644 index 7aa8bc93..00000000 --- a/MasterPassword/types.c +++ /dev/null @@ -1,9 +0,0 @@ -// -// types.c -// MasterPassword -// -// Created by Maarten Billemont on 02/01/12. -// Copyright (c) 2012 Lyndir. All rights reserved. -// - -#include