Compare commits
184 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5af383235a | ||
|
|
07e55140ac | ||
|
|
fbbd08790d | ||
|
|
fcaa5d1d8c | ||
|
|
ea5be8efcb | ||
|
|
c8b4933c3d | ||
|
|
981ee171ae | ||
|
|
3ed6b93736 | ||
|
|
56a515c5ea | ||
|
|
15ac7a2dbf | ||
|
|
c5c7999753 | ||
|
|
bb58ed0169 | ||
|
|
4545a5c745 | ||
|
|
da8c7064fe | ||
|
|
d9bd604436 | ||
|
|
c99252809d | ||
|
|
d704f451a3 | ||
|
|
2c9ab5d153 | ||
|
|
d5d33da12f | ||
|
|
cbef1a611b | ||
|
|
0a1f215a1a | ||
|
|
907d2a8ca6 | ||
|
|
89f6e77f67 | ||
|
|
f2fb16a0b9 | ||
|
|
e3edd42b88 | ||
|
|
cc5d246d7d | ||
|
|
ca320de6d9 | ||
|
|
ae979d7240 | ||
|
|
eb1c443940 | ||
|
|
dadcefc9bf | ||
|
|
cdbaec9751 | ||
|
|
f48d480c77 | ||
|
|
23aae490df | ||
|
|
3fcf1131ac | ||
|
|
2bdec415e9 | ||
|
|
4c12f4af56 | ||
|
|
d91140439a | ||
|
|
a7912dd1b7 | ||
|
|
05391d893e | ||
|
|
2047422b08 | ||
|
|
e3fffc1923 | ||
|
|
9bf50569cc | ||
|
|
9ef265d9de | ||
|
|
385f347b33 | ||
|
|
4058d33202 | ||
|
|
98c5ee3425 | ||
|
|
b01e370fc0 | ||
|
|
21d5ef823f | ||
|
|
da71ed6f7f | ||
|
|
5a6acb2e44 | ||
|
|
29ecbaeb19 | ||
|
|
3ebdfe1180 | ||
|
|
60ac096f99 | ||
|
|
b13bdb171e | ||
|
|
2cfa1439e6 | ||
|
|
a363a8a715 | ||
|
|
e39062a32d | ||
|
|
4c5c7b8aaf | ||
|
|
ee4e8f4229 | ||
|
|
e4d3c0b47c | ||
|
|
6e685f0036 | ||
|
|
b248f2d440 | ||
|
|
ec0712350f | ||
|
|
d440f2bcac | ||
|
|
bef55cca03 | ||
|
|
ebe5206f92 | ||
|
|
b478691980 | ||
|
|
86f956571d | ||
|
|
559934607b | ||
|
|
de4300c3d3 | ||
|
|
05f91d53db | ||
|
|
01eddf9f42 | ||
|
|
9b2c0b33ef | ||
|
|
77b095e25e | ||
|
|
93cdcc1743 | ||
|
|
2fe1ed84e6 | ||
|
|
4903df21f8 | ||
|
|
31fb9bc4e1 | ||
|
|
23dcb11a10 | ||
|
|
ee0ca569f5 | ||
|
|
8ca8ef7aab | ||
|
|
018ab83af3 | ||
|
|
58a6f17641 | ||
|
|
77bee803b8 | ||
|
|
c3f4d148a4 | ||
|
|
f94ae03bde | ||
|
|
88199db988 | ||
|
|
33ff573295 | ||
|
|
e0822b270e | ||
|
|
acc4c34b85 | ||
|
|
63b757f51a | ||
|
|
eb527d985b | ||
|
|
94159ed11a | ||
|
|
18fce4eaf8 | ||
|
|
8347c72882 | ||
|
|
f03abb1c8d | ||
|
|
10cfe95158 | ||
|
|
c6b285a9c0 | ||
|
|
67e18895ab | ||
|
|
8b7cf2e86d | ||
|
|
a267c0d1db | ||
|
|
f60093513e | ||
|
|
5b47d47a1b | ||
|
|
f8f48743b0 | ||
|
|
b46bf25c19 | ||
|
|
e754e1ddce | ||
|
|
0f4a66f5d3 | ||
|
|
3036697004 | ||
|
|
097d240feb | ||
|
|
dd9e4eafbc | ||
|
|
2199757d9b | ||
|
|
00887f6277 | ||
|
|
21945ae23f | ||
|
|
d3f2a01da2 | ||
|
|
f427e06692 | ||
|
|
73421b3299 | ||
|
|
564e5d9084 | ||
|
|
88d818833c | ||
|
|
0498a245c6 | ||
|
|
77bb2ef4cd | ||
|
|
207b375ae9 | ||
|
|
c1f4d2db24 | ||
|
|
ca3a8ee78c | ||
|
|
e88ec0927e | ||
|
|
e6774592d7 | ||
|
|
6834f3689f | ||
|
|
c2fc5e6072 | ||
|
|
ade5c274b1 | ||
|
|
1da235bbdf | ||
|
|
b050cc4994 | ||
|
|
3e31dac7e0 | ||
|
|
eea9051dbb | ||
|
|
d560a2052d | ||
|
|
af7edd05d4 | ||
|
|
33f817a585 | ||
|
|
e2d3f14fdf | ||
|
|
e205926c8c | ||
|
|
d48494a566 | ||
|
|
00ad9d59ca | ||
|
|
af7327555c | ||
|
|
1977a423a5 | ||
|
|
fa588f8fe2 | ||
|
|
ba00d89b99 | ||
|
|
c498d8b1ec | ||
|
|
e6b398d09d | ||
|
|
a72d893203 | ||
|
|
a5368033a3 | ||
|
|
588ebe08cd | ||
|
|
28bd162e05 | ||
|
|
2897bc741c | ||
|
|
e11e73c0db | ||
|
|
672d8ba089 | ||
|
|
3a70d5e38d | ||
|
|
b9298996e8 | ||
|
|
28afa1a56d | ||
|
|
17cc647cf5 | ||
|
|
9863fbb073 | ||
|
|
49398bb9f0 | ||
|
|
b52b310e82 | ||
|
|
6a74ada2fa | ||
|
|
c8a40a7062 | ||
|
|
2889c73af3 | ||
|
|
9249967c6f | ||
|
|
24f5ceac51 | ||
|
|
060059ff0c | ||
|
|
0f7793e9ba | ||
|
|
a4cf7f9f3c | ||
|
|
8978433aed | ||
|
|
b4efe301a4 | ||
|
|
9a82e617b3 | ||
|
|
2647279ff6 | ||
|
|
dae84c4a2e | ||
|
|
3b74543c51 | ||
|
|
1918c30bed | ||
|
|
bbeb6bb948 | ||
|
|
15b14d67db | ||
|
|
35c443d82d | ||
|
|
d950d4be3b | ||
|
|
d7aae64b5d | ||
|
|
657e4c8a9d | ||
|
|
f238bb723d | ||
|
|
b4da801bb0 | ||
|
|
ce7aa46af6 | ||
|
|
83c28692ad |
57
.gitignore
vendored
57
.gitignore
vendored
@@ -3,40 +3,45 @@
|
||||
Thumbs.db
|
||||
|
||||
# IntelliJ
|
||||
/MasterPassword/Java/.idea
|
||||
/.idea/*
|
||||
!/.idea/encodings.xml
|
||||
!/.idea/inspectionProfiles
|
||||
!/.idea/projectCodeStyle.xml
|
||||
!/.idea/validation.xml
|
||||
.idea
|
||||
*.iml
|
||||
/*.ipr
|
||||
/*.iws
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# Xcode IDE
|
||||
xcuserdata/
|
||||
/DerivedData/
|
||||
DerivedData/
|
||||
|
||||
# Generated
|
||||
MasterPassword/Resources/Media/Images.xcassets/
|
||||
/platform-independent/cli-c/VERSION
|
||||
/platform-independent/cli-c/mpw-*.tar.gz
|
||||
/platform-darwin/Resources/Media/Images.xcassets/
|
||||
|
||||
# Media
|
||||
Press/Background.png
|
||||
Press/Front-Page.png
|
||||
Press/MasterPassword_PressKit/MasterPassword_pressrelease_*.pdf
|
||||
public/Press/Background.png
|
||||
public/Press/Front-Page.png
|
||||
public/Press/MasterPassword_PressKit/MasterPassword_pressrelease_*.pdf
|
||||
|
||||
# IPA
|
||||
/sendipa/*
|
||||
!/sendipa/sendipa.conf
|
||||
# Gradle
|
||||
build
|
||||
!/build
|
||||
.gradle
|
||||
local.properties
|
||||
|
||||
# Maven
|
||||
target
|
||||
dependency-reduced-pom.xml
|
||||
|
||||
# C
|
||||
MasterPassword/C/VERSION
|
||||
MasterPassword/C/*.o
|
||||
MasterPassword/C/mpw-*.tar.gz
|
||||
MasterPassword/C/mpw
|
||||
MasterPassword/C/mpw-bench
|
||||
MasterPassword/C/mpw-tests
|
||||
MasterPassword/C/lib/*/.unpacked
|
||||
MasterPassword/C/lib/*/.patched
|
||||
MasterPassword/C/lib/*/src
|
||||
MasterPassword/C/lib/include
|
||||
core/c/*.o
|
||||
core/c/lib/*/.unpacked
|
||||
core/c/lib/*/.patched
|
||||
core/c/lib/*/src
|
||||
core/c/lib/include
|
||||
platform-independent/cli-c/cli/*.o
|
||||
platform-independent/cli-c/mpw-*.tar.gz
|
||||
platform-independent/cli-c/mpw-*.tar.gz.sig
|
||||
platform-independent/cli-c/mpw
|
||||
platform-independent/cli-c/mpw-bench
|
||||
platform-independent/cli-c/mpw-tests
|
||||
platform-independent/cli-c/VERSION
|
||||
|
||||
19
.gitmodules
vendored
19
.gitmodules
vendored
@@ -1,21 +1,24 @@
|
||||
[submodule "External/Pearl"]
|
||||
path = External/Pearl
|
||||
path = platform-darwin/External/Pearl
|
||||
url = git://github.com/Lyndir/Pearl.git
|
||||
[submodule "External/InAppSettingsKit"]
|
||||
path = External/InAppSettingsKit
|
||||
path = platform-darwin/External/InAppSettingsKit
|
||||
url = git://github.com/lhunath/InAppSettingsKit.git
|
||||
[submodule "External/KCOrderedAccessorFix"]
|
||||
path = External/KCOrderedAccessorFix
|
||||
path = platform-darwin/External/KCOrderedAccessorFix
|
||||
url = https://github.com/lhunath/KCOrderedAccessorFix.git
|
||||
[submodule "External/AttributedMarkdown"]
|
||||
path = External/AttributedMarkdown
|
||||
path = platform-darwin/External/AttributedMarkdown
|
||||
url = https://github.com/dreamwieber/AttributedMarkdown.git
|
||||
[submodule "External/uicolor-utilities"]
|
||||
path = External/uicolor-utilities
|
||||
path = platform-darwin/External/uicolor-utilities
|
||||
url = git://github.com/lhunath/uicolor-utilities.git
|
||||
[submodule "External/jrswizzle"]
|
||||
path = External/jrswizzle
|
||||
path = platform-darwin/External/jrswizzle
|
||||
url = git://github.com/jonmarimba/jrswizzle.git
|
||||
[submodule "Site/mpw-js/js/mpw-js"]
|
||||
path = Site/mpw-js/js/mpw-js
|
||||
[submodule "MasterPassword/Web/js/mpw-js"]
|
||||
path = platform-independent/web-js/js/mpw-js
|
||||
url = https://github.com/tmthrgd/mpw-js.git
|
||||
[submodule "platform-darwin/External/libsodium"]
|
||||
path = platform-darwin/External/libsodium
|
||||
url = https://github.com/jedisct1/libsodium.git
|
||||
|
||||
11
.idea/encodings.xml
generated
11
.idea/encodings.xml
generated
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false">
|
||||
<file url="file://$PROJECT_DIR$/MasterPassword/Java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/MasterPassword/Java/masterpassword-algorithm" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/MasterPassword/Java/masterpassword-cli" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/MasterPassword/Java/masterpassword-gui" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/MasterPassword/Java/masterpassword-model" charset="UTF-8" />
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
18
.idea/inspectionProfiles/Project_Default.xml
generated
18
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,18 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0" is_locked="false">
|
||||
<option name="myName" value="Project Default" />
|
||||
<option name="myLocal" value="false" />
|
||||
<inspection_tool class="Convert to string" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="FunctionImplicitDeclarationInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="ImplicitIntegerAndEnumConversion" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="MethodIsLaterInTheScope" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OCNotLocalizedStringInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OCUnusedMacroInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="OCUnusedMethodInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="Replace with subshell" enabled="true" level="INFO" enabled_by_default="true" />
|
||||
<inspection_tool class="SignednessMismatch" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnavailableInDeploymentTarget" enabled="true" level="INFO" enabled_by_default="true" />
|
||||
<inspection_tool class="UnusedLocalVariable" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="UnusedParameter" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
||||
7
.idea/inspectionProfiles/profiles_settings.xml
generated
7
.idea/inspectionProfiles/profiles_settings.xml
generated
@@ -1,7 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||
<option name="USE_PROJECT_PROFILE" value="true" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
12
.travis.yml
12
.travis.yml
@@ -1,8 +1,10 @@
|
||||
language: objective-c
|
||||
osx_image: xcode7
|
||||
xcode_scheme: MasterPassword iOS (App Store)
|
||||
xcode_workspace: MasterPassword.xcworkspace
|
||||
xcode_sdk: iphonesimulator
|
||||
env: TERM=dumb
|
||||
osx_image: xcode8.3
|
||||
env: TERM=dumb SHLVL=0
|
||||
git:
|
||||
submodules: true
|
||||
script:
|
||||
- "( brew install libsodium )"
|
||||
- "( cd ./platform-independent/cli-c && ./clean && targets='mpw mpw-bench mpw-tests' ./build && ./mpw-tests )"
|
||||
- "( xcodebuild -workspace platform-darwin/MasterPassword.xcworkspace -configuration 'Test' -scheme 'MasterPassword iOS' -sdk iphonesimulator )"
|
||||
- "( xcodebuild -workspace platform-darwin/MasterPassword.xcworkspace -configuration 'Test' -scheme 'MasterPassword macOS' )"
|
||||
|
||||
1
External/InAppSettingsKit
vendored
1
External/InAppSettingsKit
vendored
Submodule External/InAppSettingsKit deleted from b58b72563a
Binary file not shown.
BIN
External/Mac/Crashlytics.framework/submit
vendored
BIN
External/Mac/Crashlytics.framework/submit
vendored
Binary file not shown.
BIN
External/Mac/Crashlytics.framework/uploadDSYM
vendored
BIN
External/Mac/Crashlytics.framework/uploadDSYM
vendored
Binary file not shown.
BIN
External/Mac/Fabric.framework/uploadDSYM
vendored
BIN
External/Mac/Fabric.framework/uploadDSYM
vendored
Binary file not shown.
1
External/Pearl
vendored
1
External/Pearl
vendored
Submodule External/Pearl deleted from 8b6e3481d7
BIN
External/iOS/Crashlytics.framework/Crashlytics
vendored
BIN
External/iOS/Crashlytics.framework/Crashlytics
vendored
Binary file not shown.
55
External/iOS/Crashlytics.framework/Info.plist
vendored
55
External/iOS/Crashlytics.framework/Info.plist
vendored
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>14F1021</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Crashlytics</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.twitter.crashlytics.ios</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Crashlytics</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.4.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>iPhoneOS</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>92</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>13B137</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>iphoneos</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>9.1</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>13B137</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>iphoneos9.1</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0710</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>7B91b</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2015 Crashlytics, Inc. All rights reserved.</string>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
External/iOS/Crashlytics.framework/submit
vendored
BIN
External/iOS/Crashlytics.framework/submit
vendored
Binary file not shown.
BIN
External/iOS/Crashlytics.framework/uploadDSYM
vendored
BIN
External/iOS/Crashlytics.framework/uploadDSYM
vendored
Binary file not shown.
BIN
External/iOS/Fabric.framework/Fabric
vendored
BIN
External/iOS/Fabric.framework/Fabric
vendored
Binary file not shown.
BIN
External/iOS/Fabric.framework/uploadDSYM
vendored
BIN
External/iOS/Fabric.framework/uploadDSYM
vendored
Binary file not shown.
1
External/iOS/Reveal.framework
vendored
1
External/iOS/Reveal.framework
vendored
@@ -1 +0,0 @@
|
||||
/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/Reveal.framework
|
||||
10
MasterPassword.xcworkspace/contents.xcworkspacedata
generated
10
MasterPassword.xcworkspace/contents.xcworkspacedata
generated
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:MasterPassword/ObjC/iOS/MasterPassword-iOS.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:MasterPassword/ObjC/Mac/MasterPassword-Mac.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd "${BASH_SOURCE%/*}"
|
||||
tag=$(git describe)
|
||||
commit=$(git describe --long --dirty)
|
||||
[[ $tag && $commit = $tag* ]] || exit 1
|
||||
git show --show-signature --pretty=format:%H --quiet "$tag" > VERSION
|
||||
|
||||
mpwArchive=mpw-$commit.tar.gz
|
||||
[[ -e $mpwArchive ]] && echo "WARNING: $mpwArchive already exists. Will overwrite."
|
||||
read -n1 -p "Will prepare and release $mpwArchive. Press a key to continue or ^C to abort."
|
||||
|
||||
git ls-files -z . | xargs -0 tar -Lcvzf "$mpwArchive"
|
||||
echo "$mpwArchive ready, SHA256: $(openssl sha -sha256 < "$mpwArchive")"
|
||||
|
||||
cd ../../Site/current
|
||||
ln -sf "../../MasterPassword/C/$mpwArchive"
|
||||
[[ -e $_ ]]
|
||||
echo "Linked from site, please update your hyperlinks to point to http://masterpasswordapp.com/$mpwArchive"
|
||||
@@ -1,4 +0,0 @@
|
||||
home=http://www.tarsnap.com/scrypt.html
|
||||
git=https://github.com/Tarsnap/scrypt.git
|
||||
pkg=http://www.tarsnap.com/scrypt/scrypt-1.2.0.tgz
|
||||
pkg_sha256=1754bc89405277c8ac14220377a4c240ddc34b1ce70882aa92cd01bfdc8569d4
|
||||
@@ -1 +0,0 @@
|
||||
../Java/masterpassword-algorithm/src/test/resources/mpw_tests.xml
|
||||
2
MasterPassword/Java/.gitignore
vendored
2
MasterPassword/Java/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
target
|
||||
dependency-reduced-pom.xml
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.lyndir.masterpassword;
|
||||
|
||||
/**
|
||||
* <i>07 04, 2012</i>
|
||||
*
|
||||
* @author lhunath
|
||||
*/
|
||||
public enum MPSiteFeature {
|
||||
|
||||
/**
|
||||
* Export the key-protected content data.
|
||||
*/
|
||||
ExportContent( 1 << 10 ),
|
||||
|
||||
/**
|
||||
* Never export content.
|
||||
*/
|
||||
DevicePrivate( 1 << 11 );
|
||||
|
||||
MPSiteFeature(final int mask) {
|
||||
this.mask = mask;
|
||||
}
|
||||
|
||||
private final int mask;
|
||||
|
||||
public int getMask() {
|
||||
return mask;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.lyndir.masterpassword;
|
||||
|
||||
/**
|
||||
* <i>07 04, 2012</i>
|
||||
*
|
||||
* @author lhunath
|
||||
*/
|
||||
public enum MPSiteTypeClass {
|
||||
Generated( 1 << 4 ),
|
||||
Stored( 1 << 5 );
|
||||
|
||||
private final int mask;
|
||||
|
||||
MPSiteTypeClass(final int mask) {
|
||||
this.mask = mask;
|
||||
}
|
||||
|
||||
public int getMask() {
|
||||
return mask;
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.lyndir.masterpassword;
|
||||
|
||||
import static com.lyndir.lhunath.opal.system.util.StringUtils.strf;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.lyndir.lhunath.opal.system.util.MetaObject;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* <i>07 04, 2012</i>
|
||||
*
|
||||
* @author lhunath
|
||||
*/
|
||||
public class MPTemplate extends MetaObject {
|
||||
|
||||
private final String templateString;
|
||||
private final List<MPTemplateCharacterClass> template;
|
||||
|
||||
MPTemplate(final String templateString) {
|
||||
|
||||
ImmutableList.Builder<MPTemplateCharacterClass> builder = ImmutableList.builder();
|
||||
for (int i = 0; i < templateString.length(); ++i)
|
||||
builder.add( MPTemplateCharacterClass.forIdentifier( templateString.charAt( i ) ) );
|
||||
|
||||
this.templateString = templateString;
|
||||
template = builder.build();
|
||||
}
|
||||
|
||||
public String getTemplateString() {
|
||||
return templateString;
|
||||
}
|
||||
|
||||
public MPTemplateCharacterClass getCharacterClassAtIndex(final int index) {
|
||||
|
||||
return template.get( index );
|
||||
}
|
||||
|
||||
public int length() {
|
||||
|
||||
return template.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return strf( "{MPTemplate: %s}", templateString );
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @author lhunath, 15-02-04
|
||||
*/
|
||||
|
||||
|
||||
@ParametersAreNonnullByDefault package com.lyndir.masterpassword;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.lyndir.masterpassword"
|
||||
android:versionCode="2003"
|
||||
android:versionName="2.3">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="19"
|
||||
android:targetSdkVersion="21" />
|
||||
|
||||
<application
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name"
|
||||
android:allowBackup="true"
|
||||
android:debuggable="true">
|
||||
<activity android:name=".EmergencyActivity" android:theme="@style/MPTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".TestActivity" android:theme="@style/MPTheme" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/*___Generated_by_IDEA___*/
|
||||
|
||||
package com.lyndir.masterpassword;
|
||||
|
||||
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
|
||||
public final class BuildConfig {
|
||||
public final static boolean DEBUG = Boolean.parseBoolean(null);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
/*___Generated_by_IDEA___*/
|
||||
|
||||
package com.lyndir.masterpassword;
|
||||
|
||||
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
|
||||
public final class Manifest {
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
/*___Generated_by_IDEA___*/
|
||||
|
||||
package com.lyndir.masterpassword;
|
||||
|
||||
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
|
||||
public final class R {
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
/Users/lhunath/SpiderOak Hive/secret/release-com.lyndir.masterpassword.jks
|
||||
@@ -1,34 +0,0 @@
|
||||
package com.lyndir.masterpassword;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Typeface;
|
||||
|
||||
|
||||
/**
|
||||
* @author lhunath, 2014-08-25
|
||||
*/
|
||||
public class Res {
|
||||
|
||||
public static Typeface sourceCodePro_Black;
|
||||
public static Typeface sourceCodePro_ExtraLight;
|
||||
public static Typeface exo_Bold;
|
||||
public static Typeface exo_ExtraBold;
|
||||
public static Typeface exo_Regular;
|
||||
public static Typeface exo_Thin;
|
||||
|
||||
private static boolean initialized;
|
||||
|
||||
public static void init(Resources resources) {
|
||||
|
||||
if (initialized)
|
||||
return;
|
||||
initialized = true;
|
||||
|
||||
sourceCodePro_Black = Typeface.createFromAsset( resources.getAssets(), "SourceCodePro-Black.otf" );
|
||||
sourceCodePro_ExtraLight = Typeface.createFromAsset( resources.getAssets(), "SourceCodePro-ExtraLight.otf" );
|
||||
exo_Bold = Typeface.createFromAsset( resources.getAssets(), "Exo2.0-Bold.otf" );
|
||||
exo_ExtraBold = Typeface.createFromAsset( resources.getAssets(), "Exo2.0-ExtraBold.otf" );
|
||||
exo_Regular = Typeface.createFromAsset( resources.getAssets(), "Exo2.0-Regular.otf" );
|
||||
exo_Thin = Typeface.createFromAsset( resources.getAssets(), "Exo2.0-Thin.otf" );
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
/Users/lhunath/SpiderOak Hive/secret/release-com.lyndir.masterpassword.jks
|
||||
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAlgorithmV0
|
||||
//
|
||||
// Created by Maarten Billemont on 16/07/12.
|
||||
// Copyright 2012 lhunath (Maarten Billemont). All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAlgorithm.h"
|
||||
|
||||
@interface MPAlgorithmV0 : NSObject<MPAlgorithm>
|
||||
@end
|
||||
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAlgorithmV1
|
||||
//
|
||||
// Created by Maarten Billemont on 17/07/12.
|
||||
// Copyright 2012 lhunath (Maarten Billemont). All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAlgorithmV0.h"
|
||||
|
||||
@interface MPAlgorithmV1 : MPAlgorithmV0
|
||||
@end
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAlgorithmV1
|
||||
//
|
||||
// Created by Maarten Billemont on 17/07/12.
|
||||
// Copyright 2012 lhunath (Maarten Billemont). All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAlgorithmV1.h"
|
||||
#import "MPEntities.h"
|
||||
|
||||
@implementation MPAlgorithmV1
|
||||
|
||||
- (MPAlgorithmVersion)version {
|
||||
|
||||
return MPAlgorithmVersion1;
|
||||
}
|
||||
|
||||
- (BOOL)tryMigrateSite:(MPSiteEntity *)site explicit:(BOOL)explicit {
|
||||
|
||||
if ([site.algorithm version] != [self version] - 1)
|
||||
// Only migrate from previous version.
|
||||
return NO;
|
||||
|
||||
if (!explicit) {
|
||||
if (site.type & MPSiteTypeClassGenerated) {
|
||||
// This migration requires explicit permission for types of the generated class.
|
||||
site.requiresExplicitMigration = YES;
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply migration.
|
||||
site.requiresExplicitMigration = NO;
|
||||
site.algorithm = self;
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAlgorithmV2
|
||||
//
|
||||
// Created by Maarten Billemont on 17/07/12.
|
||||
// Copyright 2012 lhunath (Maarten Billemont). All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAlgorithmV1.h"
|
||||
|
||||
@interface MPAlgorithmV2 : MPAlgorithmV1
|
||||
@end
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAlgorithmV2
|
||||
//
|
||||
// Created by Maarten Billemont on 17/07/12.
|
||||
// Copyright 2012 lhunath (Maarten Billemont). All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAlgorithmV2.h"
|
||||
#import "MPEntities.h"
|
||||
|
||||
@implementation MPAlgorithmV2
|
||||
|
||||
- (MPAlgorithmVersion)version {
|
||||
|
||||
return MPAlgorithmVersion2;
|
||||
}
|
||||
|
||||
- (BOOL)tryMigrateSite:(MPSiteEntity *)site explicit:(BOOL)explicit {
|
||||
|
||||
if ([site.algorithm version] != [self version] - 1)
|
||||
// Only migrate from previous version.
|
||||
return NO;
|
||||
|
||||
if (!explicit) {
|
||||
if (site.type & MPSiteTypeClassGenerated && site.name.length != [site.name dataUsingEncoding:NSUTF8StringEncoding].length) {
|
||||
// This migration requires explicit permission for types of the generated class.
|
||||
site.requiresExplicitMigration = YES;
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply migration.
|
||||
site.requiresExplicitMigration = NO;
|
||||
site.algorithm = self;
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAlgorithmV3
|
||||
//
|
||||
// Created by Maarten Billemont on 13/01/15.
|
||||
// Copyright 2015 lhunath (Maarten Billemont). All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAlgorithmV2.h"
|
||||
|
||||
@interface MPAlgorithmV3 : MPAlgorithmV2
|
||||
@end
|
||||
@@ -1,49 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAlgorithmV3
|
||||
//
|
||||
// Created by Maarten Billemont on 13/01/15.
|
||||
// Copyright 2015 lhunath (Maarten Billemont). All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAlgorithmV3.h"
|
||||
#import "MPEntities.h"
|
||||
|
||||
@implementation MPAlgorithmV3
|
||||
|
||||
- (MPAlgorithmVersion)version {
|
||||
|
||||
return MPAlgorithmVersion3;
|
||||
}
|
||||
|
||||
- (BOOL)tryMigrateSite:(MPSiteEntity *)site explicit:(BOOL)explicit {
|
||||
|
||||
if ([site.algorithm version] != [self version] - 1)
|
||||
// Only migrate from previous version.
|
||||
return NO;
|
||||
|
||||
if (!explicit) {
|
||||
if (site.type & MPSiteTypeClassGenerated &&
|
||||
site.user.name.length != [site.user.name dataUsingEncoding:NSUTF8StringEncoding].length) {
|
||||
// This migration requires explicit permission for types of the generated class.
|
||||
site.requiresExplicitMigration = YES;
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply migration.
|
||||
site.requiresExplicitMigration = NO;
|
||||
site.algorithm = self;
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// MPAppDelegate_Key.h
|
||||
// MasterPassword
|
||||
//
|
||||
// Created by Maarten Billemont on 24/11/11.
|
||||
// Copyright (c) 2011 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAppDelegate_Shared.h"
|
||||
|
||||
@interface MPAppDelegate_Shared(Key)
|
||||
|
||||
- (BOOL)signInAsUser:(MPUserEntity *)user saveInContext:(NSManagedObjectContext *)moc usingMasterPassword:(NSString *)password;
|
||||
- (void)signOutAnimated:(BOOL)animated;
|
||||
|
||||
- (void)storeSavedKeyFor:(MPUserEntity *)user;
|
||||
- (void)forgetSavedKeyFor:(MPUserEntity *)user;
|
||||
|
||||
@end
|
||||
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// MPAppDelegate_Shared.h
|
||||
// MasterPassword
|
||||
//
|
||||
// Created by Maarten Billemont on 24/11/11.
|
||||
// Copyright (c) 2011 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPEntities.h"
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
@interface MPAppDelegate_Shared : PearlAppDelegate
|
||||
#else
|
||||
@interface MPAppDelegate_Shared : NSObject <PearlConfigDelegate>
|
||||
#endif
|
||||
|
||||
@property(strong, nonatomic, readonly) MPKey *key;
|
||||
@property(strong, nonatomic, readonly) NSManagedObjectID *activeUserOID;
|
||||
@property(strong, nonatomic, readonly) NSPersistentStoreCoordinator *storeCoordinator;
|
||||
|
||||
+ (instancetype)get;
|
||||
|
||||
- (MPUserEntity *)activeUserForMainThread;
|
||||
- (MPUserEntity *)activeUserInContext:(NSManagedObjectContext *)context;
|
||||
- (void)setActiveUser:(MPUserEntity *)activeUser;
|
||||
- (void)handleCoordinatorError:(NSError *)error;
|
||||
|
||||
@end
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// MPAppDelegate_Key.h
|
||||
// MasterPassword
|
||||
//
|
||||
// Created by Maarten Billemont on 24/11/11.
|
||||
// Copyright (c) 2011 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAppDelegate_Shared.h"
|
||||
|
||||
#import "MPFixable.h"
|
||||
|
||||
typedef NS_ENUM( NSUInteger, MPImportResult ) {
|
||||
MPImportResultSuccess,
|
||||
MPImportResultCancelled,
|
||||
MPImportResultInvalidPassword,
|
||||
MPImportResultMalformedInput,
|
||||
MPImportResultInternalError,
|
||||
};
|
||||
|
||||
@interface MPAppDelegate_Shared(Store)
|
||||
|
||||
+ (NSManagedObjectContext *)managedObjectContextForMainThreadIfReady;
|
||||
+ (BOOL)managedObjectContextForMainThreadPerformBlock:(void (^)(NSManagedObjectContext *mainContext))mocBlock;
|
||||
+ (BOOL)managedObjectContextForMainThreadPerformBlockAndWait:(void (^)(NSManagedObjectContext *mainContext))mocBlock;
|
||||
+ (BOOL)managedObjectContextPerformBlock:(void (^)(NSManagedObjectContext *context))mocBlock;
|
||||
+ (BOOL)managedObjectContextPerformBlockAndWait:(void (^)(NSManagedObjectContext *context))mocBlock;
|
||||
|
||||
- (MPFixableResult)findAndFixInconsistenciesSaveInContext:(NSManagedObjectContext *)context;
|
||||
- (void)deleteAndResetStore;
|
||||
|
||||
/** @param completion The block to execute after adding the site, executed from the main thread with the new site in the main MOC. */
|
||||
- (void)addSiteNamed:(NSString *)siteName completion:(void ( ^ )(MPSiteEntity *site, NSManagedObjectContext *context))completion;
|
||||
- (MPSiteEntity *)changeSite:(MPSiteEntity *)site saveInContext:(NSManagedObjectContext *)context toType:(MPSiteType)type;
|
||||
- (MPImportResult)importSites:(NSString *)importedSitesString
|
||||
askImportPassword:(NSString *(^)(NSString *userName))importPassword
|
||||
askUserPassword:(NSString *(^)(NSString *userName, NSUInteger importCount, NSUInteger deleteCount))userPassword;
|
||||
- (NSString *)exportSitesRevealPasswords:(BOOL)revealPasswords;
|
||||
|
||||
@end
|
||||
@@ -1,34 +0,0 @@
|
||||
//
|
||||
// MPUserEntity.h
|
||||
// MasterPassword-Mac
|
||||
//
|
||||
// Created by Maarten Billemont on 2014-09-21.
|
||||
// Copyright (c) 2014 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
|
||||
@class MPSiteEntity;
|
||||
|
||||
@interface MPUserEntity : NSManagedObject
|
||||
|
||||
@property (nonatomic, retain) NSNumber * avatar_;
|
||||
@property (nonatomic, retain) NSNumber * defaultType_;
|
||||
@property (nonatomic, retain) NSData * keyID;
|
||||
@property (nonatomic, retain) NSDate * lastUsed;
|
||||
@property (nonatomic, retain) NSString * name;
|
||||
@property (nonatomic, retain) NSNumber * saveKey_;
|
||||
@property (nonatomic, retain) NSNumber * touchID_;
|
||||
@property (nonatomic, retain) NSNumber * version_;
|
||||
@property (nonatomic, retain) NSSet *sites;
|
||||
@end
|
||||
|
||||
@interface MPUserEntity (CoreDataGeneratedAccessors)
|
||||
|
||||
- (void)addSitesObject:(MPSiteEntity *)value;
|
||||
- (void)removeSitesObject:(MPSiteEntity *)value;
|
||||
- (void)addSites:(NSSet *)values;
|
||||
- (void)removeSites:(NSSet *)values;
|
||||
|
||||
@end
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPInitialWindowController.h
|
||||
// MPInitialWindowController
|
||||
//
|
||||
// Created by lhunath on 2014-06-29.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@interface MPInitialWindowController : NSWindowController
|
||||
|
||||
@property(nonatomic, weak) IBOutlet NSButton *openAtLoginButton;
|
||||
|
||||
- (IBAction)iphoneAppStore:(id)sender;
|
||||
- (IBAction)androidPlayStore:(id)sender;
|
||||
- (IBAction)togglePreference:(id)sender;
|
||||
|
||||
@end
|
||||
@@ -1,57 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPInitialWindowController.h
|
||||
// MPInitialWindowController
|
||||
//
|
||||
// Created by lhunath on 2014-06-29.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPInitialWindowController.h"
|
||||
#import "MPMacAppDelegate.h"
|
||||
#import "MPAppDelegate_Store.h"
|
||||
|
||||
@implementation MPInitialWindowController
|
||||
|
||||
#pragma mark - Life
|
||||
|
||||
- (void)windowDidLoad {
|
||||
|
||||
[super windowDidLoad];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserverForName:NSWindowWillCloseNotification object:self.window
|
||||
queue:nil usingBlock:^(NSNotification *note) {
|
||||
[MPMacAppDelegate get].initialWindowController = nil;
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
|
||||
- (IBAction)iphoneAppStore:(id)sender {
|
||||
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://itunes.apple.com/app/id510296984"]];
|
||||
[self close];
|
||||
}
|
||||
|
||||
- (IBAction)androidPlayStore:(id)sender {
|
||||
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://masterpasswordapp.com"]];
|
||||
[self close];
|
||||
}
|
||||
|
||||
- (IBAction)togglePreference:(id)sender {
|
||||
|
||||
if (sender == self.openAtLoginButton)
|
||||
[[MPMacAppDelegate get] setLoginItemEnabled:self.openAtLoginButton.state == NSOnState];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPSiteModel.h
|
||||
// MPSiteModel
|
||||
//
|
||||
// Created by lhunath on 2/11/2014.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MPSiteEntity.h"
|
||||
#import "MPAlgorithm.h"
|
||||
#import "MPUserEntity.h"
|
||||
|
||||
@class MPSiteEntity;
|
||||
|
||||
@interface MPSiteModel : NSObject
|
||||
|
||||
@property (nonatomic) NSString *name;
|
||||
@property (nonatomic) NSAttributedString *displayedName;
|
||||
@property (nonatomic) MPSiteType type;
|
||||
@property (nonatomic) NSString *typeName;
|
||||
@property (nonatomic) NSString *content;
|
||||
@property (nonatomic) NSString *displayedContent;
|
||||
@property (nonatomic) NSString *question;
|
||||
@property (nonatomic) NSString *answer;
|
||||
@property (nonatomic) NSString *loginName;
|
||||
@property (nonatomic) NSNumber *uses;
|
||||
@property (nonatomic) NSUInteger counter;
|
||||
@property (nonatomic) NSDate *lastUsed;
|
||||
@property (nonatomic) id<MPAlgorithm> algorithm;
|
||||
@property (nonatomic) MPAlgorithmVersion algorithmVersion;
|
||||
@property (nonatomic, readonly) BOOL outdated;
|
||||
@property (nonatomic, readonly) BOOL generated;
|
||||
@property (nonatomic, readonly) BOOL stored;
|
||||
@property (nonatomic, readonly) BOOL transient;
|
||||
|
||||
- (instancetype)initWithEntity:(MPSiteEntity *)entity fuzzyGroups:(NSArray *)fuzzyGroups;
|
||||
- (instancetype)initWithName:(NSString *)siteName forUser:(MPUserEntity *)user;
|
||||
- (MPSiteEntity *)entityInContext:(NSManagedObjectContext *)moc;
|
||||
|
||||
- (void)updateContent;
|
||||
@end
|
||||
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPSitesTableView.h
|
||||
// MPSitesTableView
|
||||
//
|
||||
// Created by lhunath on 2014-06-30.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@class MPPasswordWindowController;
|
||||
|
||||
@interface MPSitesTableView : NSTableView
|
||||
|
||||
@property(nonatomic, weak) MPPasswordWindowController *controller;
|
||||
|
||||
@end
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPSitesTableView.h
|
||||
// MPSitesTableView
|
||||
//
|
||||
// Created by lhunath on 2014-06-30.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPSitesTableView.h"
|
||||
#import "MPPasswordWindowController.h"
|
||||
|
||||
@implementation MPSitesTableView
|
||||
|
||||
- (void)doCommandBySelector:(SEL)aSelector {
|
||||
|
||||
[self.controller handleCommand:aSelector];
|
||||
}
|
||||
|
||||
- (void)keyDown:(NSEvent *)theEvent {
|
||||
|
||||
[self interpretKeyEvents:@[ theEvent ]];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// main.m
|
||||
// MasterPassword-Mac-LoginHelper
|
||||
//
|
||||
// Created by Maarten Billemont on 2013-06-07.
|
||||
// Copyright (c) 2013 Maarten Billemont. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
NSURL *bundleURL = [[[[[[NSBundle mainBundle] bundleURL]
|
||||
URLByDeletingLastPathComponent] URLByDeletingLastPathComponent]
|
||||
URLByDeletingLastPathComponent] URLByDeletingLastPathComponent];
|
||||
|
||||
NSError *error = nil;
|
||||
NSRunningApplication *application = [[NSWorkspace sharedWorkspace]
|
||||
launchApplicationAtURL:bundleURL options:NSWorkspaceLaunchWithoutActivation
|
||||
configuration:@{} error:&error];
|
||||
|
||||
if (!application || error) {
|
||||
NSLog( @"Error launching main app: %@", [error debugDescription] );
|
||||
return (int)error.code?: 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0710"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DA5BFA43147E415C00F98B1E"
|
||||
BuildableName = "Master Password.app"
|
||||
BlueprintName = "MasterPassword"
|
||||
ReferencedContainer = "container:MasterPassword-Mac.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug-Mac"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DA5BFA43147E415C00F98B1E"
|
||||
BuildableName = "Master Password.app"
|
||||
BlueprintName = "MasterPassword"
|
||||
ReferencedContainer = "container:MasterPassword-Mac.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug-Mac"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DA5BFA43147E415C00F98B1E"
|
||||
BuildableName = "Master Password.app"
|
||||
BlueprintName = "MasterPassword"
|
||||
ReferencedContainer = "container:MasterPassword-Mac.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "CA_DEBUG_TRANSACTIONS"
|
||||
value = "1"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Debug-Mac"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DA5BFA43147E415C00F98B1E"
|
||||
BuildableName = "Master Password.app"
|
||||
BlueprintName = "MasterPassword"
|
||||
ReferencedContainer = "container:MasterPassword-Mac.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug-Mac">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "AdHoc-Mac"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,107 +0,0 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'MasterPassword' target in the 'MasterPassword' project
|
||||
//
|
||||
|
||||
#import <Availability.h>
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
|
||||
#warning "This project uses features only available in Mac OS X 10.8 and later."
|
||||
#endif
|
||||
|
||||
#import "Pearl-Prefix.pch"
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
|
||||
#ifdef CRASHLYTICS
|
||||
#import <Crashlytics/Crashlytics.h>
|
||||
#endif
|
||||
|
||||
#import "MPTypes.h"
|
||||
#import "MPMacConfig.h"
|
||||
|
||||
#else
|
||||
|
||||
#import <libgen.h>
|
||||
#import <CoreFoundation/CFString.h>
|
||||
#import <objc/runtime.h>
|
||||
#import <objc/message.h>
|
||||
#import <objc/NSObjCRuntime.h>
|
||||
#import <stdlib.h>
|
||||
|
||||
#define trc(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 0, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define dbg(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 1, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define inf(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 2, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define wrn(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 3, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define err(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 4, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define ftl(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 5, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
abort(); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
@@ -1,12 +0,0 @@
|
||||
//
|
||||
// main.m
|
||||
// MasterPassword
|
||||
//
|
||||
// Created by Maarten Billemont on 04/03/12.
|
||||
// Copyright (c) 2012 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
return NSApplicationMain( argc, (const char **)argv );
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// AttributedMarkdown.h
|
||||
// AttributedMarkdown
|
||||
//
|
||||
// Created by Maarten Billemont on 2014-09-28.
|
||||
// Copyright (c) 2014 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface AttributedMarkdown : NSObject
|
||||
|
||||
@end
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// AttributedMarkdown.m
|
||||
// AttributedMarkdown
|
||||
//
|
||||
// Created by Maarten Billemont on 2014-09-28.
|
||||
// Copyright (c) 2014 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AttributedMarkdown.h"
|
||||
|
||||
@implementation AttributedMarkdown
|
||||
|
||||
@end
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.lyndir.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,46 +0,0 @@
|
||||
//
|
||||
// MPPreferencesViewController.h
|
||||
// MasterPassword-iOS
|
||||
//
|
||||
// Created by Maarten Billemont on 04/06/12.
|
||||
// Copyright (c) 2012 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MPTypeViewController.h"
|
||||
#import "MPSiteQuestionEntity.h"
|
||||
|
||||
@interface MPAnswersViewController : UIViewController
|
||||
|
||||
@property (nonatomic) IBOutlet UITableView *tableView;
|
||||
|
||||
- (void)setSite:(MPSiteEntity *)site;
|
||||
- (MPSiteEntity *)siteInContext:(NSManagedObjectContext *)context;
|
||||
|
||||
@end
|
||||
|
||||
@interface MPGlobalAnswersCell : UITableViewCell
|
||||
|
||||
@property (nonatomic) IBOutlet UILabel *titleLabel;
|
||||
@property (nonatomic) IBOutlet UITextField *answerField;
|
||||
|
||||
- (void)setSite:(MPSiteEntity *)site;
|
||||
|
||||
@end
|
||||
|
||||
@interface MPSendAnswersCell : UITableViewCell
|
||||
|
||||
@end
|
||||
|
||||
@interface MPMultipleAnswersCell : UITableViewCell <UITextFieldDelegate>
|
||||
|
||||
@end
|
||||
|
||||
@interface MPAnswersQuestionCell : UITableViewCell
|
||||
|
||||
@property(nonatomic) IBOutlet UITextField *questionField;
|
||||
@property(nonatomic) IBOutlet UITextField *answerField;
|
||||
|
||||
- (void)setQuestion:(MPSiteQuestionEntity *)question forSite:(MPSiteEntity *)site inVC:(MPAnswersViewController *)VC;
|
||||
|
||||
@end
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAppSettingsViewController.h
|
||||
// MPAppSettingsViewController
|
||||
//
|
||||
// Created by lhunath on 2014-04-18.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "IASKAppSettingsViewController.h"
|
||||
|
||||
@interface MPAppSettingsViewController : IASKAppSettingsViewController
|
||||
@end
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAppSettingsViewController.h
|
||||
// MPAppSettingsViewController
|
||||
//
|
||||
// Created by lhunath on 2014-04-18.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPAppSettingsViewController.h"
|
||||
#import "UIColor+Expanded.h"
|
||||
|
||||
@implementation MPAppSettingsViewController {
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
self.tableView.contentInset = UIEdgeInsetsMake( 64, 0, 49, 0 );
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
|
||||
cell.backgroundColor = [UIColor clearColor];
|
||||
cell.textLabel.textColor = [UIColor whiteColor];
|
||||
|
||||
if (cell.selectionStyle != UITableViewCellSelectionStyleNone) {
|
||||
cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.bounds];
|
||||
cell.selectedBackgroundView.backgroundColor = [UIColor colorWithRGBAHex:0x78DDFB33];
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,47 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAvatarCell.h
|
||||
// MPAvatarCell
|
||||
//
|
||||
// Created by lhunath on 2014-03-11.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MPEntities.h"
|
||||
@class MPAvatarCell;
|
||||
|
||||
/* Avatar with a "+" symbol. */
|
||||
extern const long MPAvatarAdd;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MPAvatarMode) {
|
||||
MPAvatarModeLowered,
|
||||
MPAvatarModeRaisedButInactive,
|
||||
MPAvatarModeRaisedAndActive,
|
||||
MPAvatarModeRaisedAndHidden,
|
||||
MPAvatarModeRaisedAndMinimized,
|
||||
};
|
||||
|
||||
@interface MPAvatarCell : UICollectionViewCell
|
||||
@property (copy, nonatomic) NSString *name;
|
||||
@property (assign, nonatomic) NSUInteger avatar;
|
||||
@property (assign, nonatomic) MPAvatarMode mode;
|
||||
@property (assign, nonatomic) CGFloat visibility;
|
||||
@property (assign, nonatomic) BOOL spinnerActive;
|
||||
@property (assign, nonatomic, readonly) BOOL newUser;
|
||||
|
||||
+ (NSString *)reuseIdentifier;
|
||||
|
||||
- (void)setVisibility:(CGFloat)visibility animated:(BOOL)animated;
|
||||
- (void)setMode:(MPAvatarMode)mode animated:(BOOL)animated;
|
||||
|
||||
@end
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPCell.h
|
||||
// MPCell
|
||||
//
|
||||
// Created by lhunath on 2014-03-27.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MPCell : UICollectionViewCell
|
||||
|
||||
@end
|
||||
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPCell.h
|
||||
// MPCell
|
||||
//
|
||||
// Created by lhunath on 2014-03-27.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPCell.h"
|
||||
|
||||
@implementation MPCell {
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,35 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPCombinedViewController.h
|
||||
// MPCombinedViewController
|
||||
//
|
||||
// Created by lhunath on 2014-03-08.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPUsersViewController.h"
|
||||
#import "MPPasswordsViewController.h"
|
||||
#import "MPEmergencyViewController.h"
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MPCombinedMode) {
|
||||
MPCombinedModeUserSelection,
|
||||
MPCombinedModePasswordSelection,
|
||||
};
|
||||
|
||||
@interface MPCombinedViewController : UIViewController
|
||||
|
||||
@property(nonatomic) MPCombinedMode mode;
|
||||
@property(nonatomic, weak) MPUsersViewController *usersVC;
|
||||
@property(nonatomic, weak) MPPasswordsViewController *passwordsVC;
|
||||
@property(nonatomic, weak) MPEmergencyViewController *emergencyVC;
|
||||
|
||||
@end
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPCombinedViewController.h
|
||||
// MPCombinedViewController
|
||||
//
|
||||
// Created by lhunath on 2014-03-08.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
@interface MPEmergencyViewController : UIViewController <UITextFieldDelegate>
|
||||
|
||||
@property(weak, nonatomic) IBOutlet UIScrollView *scrollView;
|
||||
@property(weak, nonatomic) IBOutlet UIView *dialogView;
|
||||
@property(weak, nonatomic) IBOutlet UIView *containerView;
|
||||
@property(weak, nonatomic) IBOutlet UITextField *fullNameField;
|
||||
@property(weak, nonatomic) IBOutlet UITextField *masterPasswordField;
|
||||
@property(weak, nonatomic) IBOutlet UITextField *siteField;
|
||||
@property(weak, nonatomic) IBOutlet UIStepper *counterStepper;
|
||||
@property(weak, nonatomic) IBOutlet UISegmentedControl *typeControl;
|
||||
@property(weak, nonatomic) IBOutlet UILabel *counterLabel;
|
||||
@property(weak, nonatomic) IBOutlet UIActivityIndicatorView *activity;
|
||||
@property(weak, nonatomic) IBOutlet UILabel *passwordLabel;
|
||||
@property(weak, nonatomic) IBOutlet UIView *tipContainer;
|
||||
|
||||
- (IBAction)controlChanged:(UIControl *)control;
|
||||
- (IBAction)copyPassword:(UITapGestureRecognizer *)recognizer;
|
||||
|
||||
@end
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// MPGuideViewController.h
|
||||
// MasterPassword
|
||||
//
|
||||
// Created by Maarten Billemont on 30/01/12.
|
||||
// Copyright (c) 2012 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MPGuideViewController : UIViewController<UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
||||
|
||||
@property(nonatomic) IBOutlet UICollectionView *collectionView;
|
||||
@property(nonatomic) IBOutlet UILabel *captionLabel;
|
||||
@property(nonatomic) IBOutlet UIPageControl *pageControl;
|
||||
@property(nonatomic) IBOutlet UINavigationBar *navigationBar;
|
||||
|
||||
- (IBAction)close:(id)sender;
|
||||
|
||||
@end
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPLogsViewController.h
|
||||
// MPLogsViewController
|
||||
//
|
||||
// Created by lhunath on 2013-04-29.
|
||||
// Copyright, lhunath (Maarten Billemont) 2013. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MPLogsViewController : UIViewController
|
||||
@property (weak, nonatomic) IBOutlet UITextView *logView;
|
||||
@property (weak, nonatomic) IBOutlet UISegmentedControl *levelControl;
|
||||
|
||||
- (IBAction)toggleLevelControl:(UISegmentedControl *)sender;
|
||||
- (IBAction)refresh:(UIBarButtonItem *)sender;
|
||||
- (IBAction)mail:(UIBarButtonItem *)sender;
|
||||
@end
|
||||
@@ -1,25 +0,0 @@
|
||||
//
|
||||
// MPPreferencesViewController.h
|
||||
// MasterPassword-iOS
|
||||
//
|
||||
// Created by Maarten Billemont on 04/06/12.
|
||||
// Copyright (c) 2012 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MPMessage : NSObject
|
||||
|
||||
@property(nonatomic) NSString *title;
|
||||
@property(nonatomic) NSString *text;
|
||||
@property(nonatomic) BOOL info;
|
||||
|
||||
+ (instancetype)messageWithTitle:(NSString *)title text:(NSString *)text info:(BOOL)info;
|
||||
|
||||
@end
|
||||
|
||||
@interface MPMessageViewController : UIViewController
|
||||
|
||||
@property (nonatomic) MPMessage *message;
|
||||
|
||||
@end
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPNavigationController.h
|
||||
// MPNavigationController
|
||||
//
|
||||
// Created by lhunath on 2014-06-03.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface MPNavigationController : UINavigationController
|
||||
@end
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPNavigationController.h
|
||||
// MPNavigationController
|
||||
//
|
||||
// Created by lhunath on 2014-06-03.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPNavigationController.h"
|
||||
#import "MPWebViewController.h"
|
||||
|
||||
@implementation MPNavigationController
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
if ([[MPiOSConfig get].showSetup boolValue])
|
||||
[self performSegueWithIdentifier:@"setup" sender:self];
|
||||
}
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
|
||||
if ([segue.identifier isEqualToString:@"web"])
|
||||
((MPWebViewController *)segue.destinationViewController).initialURL = sender;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPOverlayViewController.h
|
||||
// MPOverlayViewController
|
||||
//
|
||||
// Created by lhunath on 2014-09-22.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface MPOverlayViewController : UIViewController
|
||||
@end
|
||||
|
||||
@interface MPOverlaySegue : UIStoryboardSegue
|
||||
|
||||
+ (instancetype)dismissViewController:(UIViewController *)viewController;
|
||||
|
||||
@end
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPAvatarCell.h
|
||||
// MPAvatarCell
|
||||
//
|
||||
// Created by lhunath on 2014-03-11.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MPEntities.h"
|
||||
#import "MPCell.h"
|
||||
|
||||
typedef NS_ENUM ( NSUInteger, MPPasswordCellMode ) {
|
||||
MPPasswordCellModePassword,
|
||||
MPPasswordCellModeSettings,
|
||||
};
|
||||
|
||||
@interface MPPasswordCell : MPCell <UIScrollViewDelegate, UITextFieldDelegate>
|
||||
|
||||
@property (nonatomic) NSArray *fuzzyGroups;
|
||||
|
||||
- (void)setSite:(MPSiteEntity *)site animated:(BOOL)animated;
|
||||
- (void)setTransientSite:(NSString *)siteName animated:(BOOL)animated;
|
||||
- (void)setMode:(MPPasswordCellMode)mode animated:(BOOL)animated;
|
||||
- (MPSiteEntity *)siteInContext:(NSManagedObjectContext *)context;
|
||||
|
||||
@end
|
||||
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPPasswordsSegue.h
|
||||
// MPPasswordsSegue
|
||||
//
|
||||
// Created by lhunath on 2014-04-12.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MPPasswordsSegue : UIStoryboardSegue
|
||||
|
||||
@property (nonatomic, assign) BOOL animated;
|
||||
|
||||
@end
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPPopdownSegue.h
|
||||
// MPPopdownSegue
|
||||
//
|
||||
// Created by lhunath on 2014-04-17.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MPPopdownSegue : UIStoryboardSegue
|
||||
@end
|
||||
@@ -1,75 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPPopdownSegue.h
|
||||
// MPPopdownSegue
|
||||
//
|
||||
// Created by lhunath on 2014-04-17.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPPopdownSegue.h"
|
||||
#import "MPPasswordsViewController.h"
|
||||
|
||||
@implementation MPPopdownSegue {
|
||||
}
|
||||
|
||||
static char UnwindingObserverKey;
|
||||
|
||||
- (void)perform {
|
||||
|
||||
MPPasswordsViewController *passwordsVC;
|
||||
UIViewController *popdownVC;
|
||||
if ([self.sourceViewController isKindOfClass:[MPPasswordsViewController class]]) {
|
||||
passwordsVC = self.sourceViewController;
|
||||
popdownVC = self.destinationViewController;
|
||||
UIView *popdownView = popdownVC.view;
|
||||
popdownView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
[passwordsVC addChildViewController:popdownVC];
|
||||
[passwordsVC.popdownContainer addSubview:popdownView];
|
||||
[passwordsVC.popdownContainer addConstraintsWithVisualFormats:@[ @"H:|[popdownView]|", @"V:|[popdownView]|" ] options:0
|
||||
metrics:nil views:NSDictionaryOfVariableBindings( popdownView )];
|
||||
|
||||
[UIView animateWithDuration:0.3f animations:^{
|
||||
[[passwordsVC.popdownToTopConstraint updatePriority:1] layoutIfNeeded];
|
||||
} completion:^(BOOL finished) {
|
||||
[popdownVC didMoveToParentViewController:passwordsVC];
|
||||
|
||||
id<NSObject> observer = [[NSNotificationCenter defaultCenter] addObserverForName:MPSignedOutNotification object:nil
|
||||
queue:[NSOperationQueue mainQueue] usingBlock:
|
||||
^(NSNotification *note) {
|
||||
[[[MPPopdownSegue alloc] initWithIdentifier:@"unwind-popdown" source:popdownVC
|
||||
destination:passwordsVC] perform];
|
||||
}];
|
||||
objc_setAssociatedObject( popdownVC, &UnwindingObserverKey, observer, OBJC_ASSOCIATION_RETAIN );
|
||||
}];
|
||||
}
|
||||
else {
|
||||
popdownVC = self.sourceViewController;
|
||||
for (passwordsVC = self.sourceViewController; passwordsVC && ![(id)passwordsVC isKindOfClass:[MPPasswordsViewController class]];
|
||||
passwordsVC = (id)passwordsVC.parentViewController);
|
||||
NSAssert( passwordsVC, @"Couldn't find passwords VC to pop back to." );
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:objc_getAssociatedObject( popdownVC, &UnwindingObserverKey )];
|
||||
objc_setAssociatedObject( popdownVC, &UnwindingObserverKey, nil, OBJC_ASSOCIATION_RETAIN );
|
||||
|
||||
[popdownVC willMoveToParentViewController:nil];
|
||||
[UIView animateWithDuration:0.3f delay:0 options:UIViewAnimationOptionOverrideInheritedDuration animations:^{
|
||||
[[passwordsVC.popdownToTopConstraint updatePriority:UILayoutPriorityDefaultHigh] layoutIfNeeded];
|
||||
} completion:^(BOOL finished) {
|
||||
[popdownVC.view removeFromSuperview];
|
||||
[popdownVC removeFromParentViewController];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPRootSegue.h
|
||||
// MPRootSegue
|
||||
//
|
||||
// Created by lhunath on 2014-09-26.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface MPRootSegue : UIStoryboardSegue
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPRootSegue.h
|
||||
// MPRootSegue
|
||||
//
|
||||
// Created by lhunath on 2014-09-26.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPRootSegue.h"
|
||||
|
||||
|
||||
@implementation MPRootSegue {
|
||||
|
||||
}
|
||||
|
||||
- (void)perform {
|
||||
|
||||
UIViewController *sourceViewController = self.sourceViewController;
|
||||
UIViewController *destinationViewController = self.destinationViewController;
|
||||
[sourceViewController addChildViewController:destinationViewController];
|
||||
destinationViewController.view.frame = sourceViewController.view.bounds;
|
||||
destinationViewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
[sourceViewController.view addSubview:destinationViewController.view];
|
||||
[destinationViewController didMoveToParentViewController:sourceViewController];
|
||||
[sourceViewController setNeedsStatusBarAppearanceUpdate];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,28 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPSetupViewController.h
|
||||
// MPSetupViewController
|
||||
//
|
||||
// Created by lhunath on 2013-04-11.
|
||||
// Copyright, lhunath (Maarten Billemont) 2013. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MPSetupViewController : UIViewController
|
||||
|
||||
@property(weak, nonatomic) IBOutlet UISwitch *rememberLoginSwitch;
|
||||
@property(weak, nonatomic) IBOutlet UISwitch *showPasswordsSwitch;
|
||||
|
||||
- (IBAction)close:(UIBarButtonItem *)sender;
|
||||
|
||||
@end
|
||||
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// MPTypeViewController.h
|
||||
// MasterPassword
|
||||
//
|
||||
// Created by Maarten Billemont on 27/11/11.
|
||||
// Copyright (c) 2011 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "MPEntities.h"
|
||||
|
||||
@protocol MPTypeDelegate<NSObject>
|
||||
|
||||
@required
|
||||
- (void)didSelectType:(MPSiteType)type;
|
||||
- (MPSiteType)selectedType;
|
||||
|
||||
@optional
|
||||
- (MPSiteEntity *)selectedSite;
|
||||
|
||||
@end
|
||||
|
||||
@interface MPTypeViewController : UITableViewController
|
||||
|
||||
@property(nonatomic, weak) id<MPTypeDelegate> delegate;
|
||||
@property(weak, nonatomic) IBOutlet UIView *recommendedTipContainer;
|
||||
|
||||
@end
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// MPWebViewController.h
|
||||
// MPWebViewController
|
||||
//
|
||||
// Created by lhunath on 2014-05-09.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface MPWebViewController : UIViewController <UIWebViewDelegate>
|
||||
|
||||
@property(nonatomic) IBOutlet UIWebView *webView;
|
||||
@property(nonatomic) IBOutlet UINavigationItem *webNavigationItem;
|
||||
|
||||
@property(nonatomic) NSURL *initialURL;
|
||||
|
||||
@end
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// MPiOSAppDelegate.h
|
||||
// MasterPassword
|
||||
//
|
||||
// Created by Maarten Billemont on 24/11/11.
|
||||
// Copyright (c) 2011 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "MPAppDelegate_Shared.h"
|
||||
|
||||
@interface MPiOSAppDelegate : MPAppDelegate_Shared
|
||||
|
||||
- (void)showFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController;
|
||||
- (void)openFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController;
|
||||
|
||||
- (void)showExportForVC:(UIViewController *)viewController;
|
||||
- (void)changeMasterPasswordFor:(MPUserEntity *)user saveInContext:(NSManagedObjectContext *)moc didResetBlock:(void (^)(void))didReset;
|
||||
|
||||
@end
|
||||
@@ -1,27 +0,0 @@
|
||||
//
|
||||
// MPConfig.h
|
||||
// MasterPassword
|
||||
//
|
||||
// Created by Maarten Billemont on 02/01/12.
|
||||
// Copyright (c) 2012 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPConfig.h"
|
||||
|
||||
@interface MPiOSConfig : MPConfig
|
||||
|
||||
@property(nonatomic, retain) NSNumber *helpHidden;
|
||||
@property(nonatomic, retain) NSNumber *siteInfoHidden;
|
||||
@property(nonatomic, retain) NSNumber *showSetup;
|
||||
@property(nonatomic, retain) NSNumber *actionsTipShown;
|
||||
@property(nonatomic, retain) NSNumber *typeTipShown;
|
||||
@property(nonatomic, retain) NSNumber *loginNameTipShown;
|
||||
@property(nonatomic, retain) NSNumber *traceMode;
|
||||
@property(nonatomic, retain) NSNumber *dictationSearch;
|
||||
@property(nonatomic, retain) NSNumber *allowDowngrade;
|
||||
@property(nonatomic, retain) NSNumber *developmentFuelRemaining;
|
||||
@property(nonatomic, retain) NSNumber *developmentFuelInvested;
|
||||
@property(nonatomic, retain) NSNumber *developmentFuelConsumption;
|
||||
@property(nonatomic, retain) NSDate *developmentFuelChecked;
|
||||
|
||||
@end
|
||||
@@ -1,107 +0,0 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'MasterPassword' target in the 'MasterPassword' project
|
||||
//
|
||||
|
||||
#import <Availability.h>
|
||||
#ifndef __IPHONE_5_0
|
||||
#warning "This project uses features only available in iOS SDK 5.0 and later."
|
||||
#endif
|
||||
|
||||
#import "Pearl-Prefix.pch"
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
|
||||
#ifdef CRASHLYTICS
|
||||
#import <Crashlytics/Crashlytics.h>
|
||||
#endif
|
||||
|
||||
#import "MPTypes.h"
|
||||
#import "MPiOSConfig.h"
|
||||
|
||||
#else
|
||||
|
||||
#import <libgen.h>
|
||||
#import <CoreFoundation/CFString.h>
|
||||
#import <objc/runtime.h>
|
||||
#import <objc/message.h>
|
||||
#import <objc/NSObjCRuntime.h>
|
||||
#import <stdlib.h>
|
||||
|
||||
#define trc(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 0, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define dbg(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 1, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define inf(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 2, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define wrn(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 3, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define err(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 4, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
} while (0)
|
||||
|
||||
#define ftl(format, ...) \
|
||||
do { \
|
||||
char *_msg = NULL; \
|
||||
asprintf( &_msg, format, ##__VA_ARGS__ ); \
|
||||
void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \
|
||||
_sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \
|
||||
sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \
|
||||
CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \
|
||||
CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 5, \
|
||||
CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \
|
||||
abort(); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
@@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0710"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DA5BFA43147E415C00F98B1E"
|
||||
BuildableName = "MasterPassword.app"
|
||||
BlueprintName = "MasterPassword"
|
||||
ReferencedContainer = "container:MasterPassword-iOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug-iOS"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DA5BFA43147E415C00F98B1E"
|
||||
BuildableName = "MasterPassword.app"
|
||||
BlueprintName = "MasterPassword"
|
||||
ReferencedContainer = "container:MasterPassword-iOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug-iOS"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DA5BFA43147E415C00F98B1E"
|
||||
BuildableName = "MasterPassword.app"
|
||||
BlueprintName = "MasterPassword"
|
||||
ReferencedContainer = "container:MasterPassword-iOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Debug-iOS"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DA5BFA43147E415C00F98B1E"
|
||||
BuildableName = "MasterPassword.app"
|
||||
BlueprintName = "MasterPassword"
|
||||
ReferencedContainer = "container:MasterPassword-iOS.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "AppStore-iOS">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "AppStore-iOS"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
||||
@@ -1,56 +0,0 @@
|
||||
/**
|
||||
* Copyright Maarten Billemont (http://www.lhunath.com, lhunath@lyndir.com)
|
||||
*
|
||||
* See the enclosed file LICENSE for license information (LGPLv3). If you did
|
||||
* not receive this file, see http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* @author Maarten Billemont <lhunath@lyndir.com>
|
||||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*/
|
||||
|
||||
//
|
||||
// NSString(MPMarkDown).h
|
||||
// NSString(MPMarkDown)
|
||||
//
|
||||
// Created by lhunath on 2014-09-28.
|
||||
// Copyright, lhunath (Maarten Billemont) 2014. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSString+MPMarkDown.h"
|
||||
#import "markdown_lib.h"
|
||||
#import "markdown_peg.h"
|
||||
|
||||
@implementation NSString(MPMarkDown)
|
||||
|
||||
- (NSAttributedString *)attributedMarkdownStringWithFontSize:(CGFloat)fontSize {
|
||||
|
||||
NSMutableAttributedString *attributedString = markdown_to_attr_string( self, 0, @{
|
||||
@(EMPH) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Bold" size:fontSize] },
|
||||
@(STRONG) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-ExtraBold" size:fontSize] },
|
||||
@(EMPH | STRONG) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-ExtraBold" size:fontSize] },
|
||||
@(PLAIN) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Regular" size:fontSize] },
|
||||
@(H1) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Thin" size:fontSize * 2.f] },
|
||||
@(H2) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Thin" size:fontSize * 1.5f] },
|
||||
@(H3) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Thin" size:fontSize * 1.17f] },
|
||||
@(H4) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Thin" size:fontSize * 1.f] },
|
||||
@(H5) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Thin" size:fontSize * .83f] },
|
||||
@(H6) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Thin" size:fontSize * .75f] },
|
||||
@(BLOCKQUOTE) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Thin" size:fontSize * 1.17f] },
|
||||
@(CODE) : @{ NSFontAttributeName : [UIFont fontWithName:@"SourceCodePro-Regular" size:fontSize] },
|
||||
@(VERBATIM) : @{ NSFontAttributeName : [UIFont fontWithName:@"SourceCodePro-Regular" size:fontSize] },
|
||||
@(NOTE) : @{ NSFontAttributeName : [UIFont fontWithName:@"Exo2.0-Thin" size:fontSize * 1.17f] },
|
||||
} );
|
||||
|
||||
// Trim trailing newlines.
|
||||
NSCharacterSet *trimSet = [NSCharacterSet newlineCharacterSet];
|
||||
while (YES) {
|
||||
NSRange range = [attributedString.string rangeOfCharacterFromSet:trimSet options:NSBackwardsSearch];
|
||||
if (!range.length || NSMaxRange( range ) != attributedString.length)
|
||||
break;
|
||||
|
||||
[attributedString replaceCharactersInRange:range withString:@""];
|
||||
}
|
||||
|
||||
return attributedString;
|
||||
}
|
||||
@end
|
||||
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// main.m
|
||||
// MasterPassword
|
||||
//
|
||||
// Created by Maarten Billemont on 24/11/11.
|
||||
// Copyright (c) 2011 Lyndir. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPiOSAppDelegate.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain( argc, argv, nil, NSStringFromClass( [MPiOSAppDelegate class] ) );
|
||||
}
|
||||
}
|
||||
249
README.md
249
README.md
@@ -1,6 +1,249 @@
|
||||
[](https://www.gittip.com/lhunath/)
|
||||
[](https://travis-ci.org/Lyndir/MasterPassword)
|
||||
[](https://gitter.im/lyndir/MasterPassword?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||
|
||||
# Master Password
|
||||
|
||||
Master Password is an algorithm and Java/iOS application to solve the real trouble with passwords.
|
||||
|
||||
|
||||
# [Master Password •••|](http://masterpasswordapp.com)
|
||||
|
||||
Master Password is a completely new way of thinking about passwords.
|
||||
|
||||
It consists of an algorithm that implements the core idea and applications for various platforms making the alogirthm available to users on a variety of devices and platforms.
|
||||
|
||||
To skip the intro and go straight to the information on how to use the code, [click here](#source-code).
|
||||
|
||||
Master Password is available for [📲 iOS](https://itunes.apple.com/app/id510296984), [🖥 macOS](https://ssl.masterpasswordapp.com/masterpassword-mac.zip), [📲 Android](https://ssl.masterpasswordapp.com/masterpassword-android.apk), [🖥 Desktop](https://ssl.masterpasswordapp.com/masterpassword-gui.jar), and [⌨ Console](https://ssl.masterpasswordapp.com/masterpassword-cli.tar.gz).
|
||||
|
||||
Master Password is also available from the following package managers: [macOS: Homebrew](https://brew.sh/) (`brew install mpw`).
|
||||
Get in touch if you are interested in adding Master Password to any other package managers.
|
||||
|
||||
There are many reasons for using Master Password instead of an ordinary password manager, read below for the details, but if you want my personal favourites, they would be:
|
||||
|
||||
- I don't need to worry about keeping backups of my countless authentication credentials.
|
||||
- I don't need to worry that when I travel, I might not have access to my passwords vault.
|
||||
- I don't need to trust an external party, proprietary code or a service to be online and stay online.
|
||||
- If I feel at risk of my device being stolen or confiscated, I can set a fake master password, delete my user or wipe it worry-free.
|
||||
|
||||
We also have a [Frequently Asked Questions](#faq).
|
||||
|
||||
|
||||
|
||||
## What is a password?
|
||||
|
||||
Ah, the "password". Somehow, passwords have become the default solution to authentication across the web. We've long since accepted this as the way things are, but let's stop to think for a moment about what passwords actually are:
|
||||
|
||||
A password is a secret that is known only to the party providing a service and the party that should be allowed access to this service.
|
||||
|
||||
Simple enough - a secret that you know and your website knows but nobody else, thereby guaranteeing that you and only you have access to your account on this website. Unfortunately, in practice, the ubiquitous use of passwords has us completely overwhelmed. And the only way we can cope with that is by finding ways of making the problem manageable.
|
||||
|
||||
|
||||
|
||||
## What's the problem?
|
||||
|
||||
Coming up with a secret password is pretty easy. Say you're organizing a secret meeting and will only let people in if they know the password at the door. You tell those you trust, the password for tonight's meeting is "purple oranges with a smile".
|
||||
|
||||
The problem we have in our daily lives, however, is the fact that we need secret passwords for almost everything now. A password for our email, twitter, 9gag, facebook, imgur, amazon, ebay, paypal, bank, reddit, etc. And every time we want to use a new site, we need another one. The problem now becomes clear: passwords are meant to be remembered and recalled with ease when needed, but this becomes impossible when we have secrets for every distinct activity in our lives.
|
||||
|
||||
We cannot recall passwords the way we are expected to when there are too many.
|
||||
|
||||
|
||||
|
||||
## Coping
|
||||
|
||||
Life gives us no advice on how to deal with this problem. So we find our own ways:
|
||||
|
||||
- We use a single personal secret for all our websites, thereby violating the secrecy of these passwords (eg. you've given your email secret to twitter).
|
||||
- We use simple variations of a personal secret or pattern, thereby trivializing the complexity of these passwords (eg. google98, twitter98; reversals, eg. 8991elgoog)
|
||||
- We use external means of remembering passwords, thereby increasing the risk of loss (both loss of access when we lose the tool and theft when a thief finds our tool)
|
||||
|
||||
These coping mechanisms come in various forms, and they all have down-sides, because at the root of each of these lies an undeniable truth:
|
||||
|
||||
Our passwords are no longer true to the original definition.
|
||||
|
||||
|
||||
|
||||
## Master Password's approach
|
||||
|
||||
The theory behind Master Password starts with accepting that it is impossible to keep track of passwords for all your accounts. Instead, we return to the core premise of the password: a secret phrase that you can remember easily, all by yourself.
|
||||
|
||||
Master Password solves this problem by letting you remember one and only one password. You use this password with Master Password only. Master Password then gives you access to any website or service you want by creating a website-specific key for it.
|
||||
|
||||
1. You sign into Master Password using your one password.
|
||||
2. You ask Master Password for the key to enter your website, eg. twitter.
|
||||
3. You log into twitter using your username and the key from Master Password.
|
||||
|
||||
Master Password is *not* a password manager. It does not store your website passwords. Therefore, there is zero risk of you losing your website passwords (or them falling in the wrong hands). Master Password simply uses your one password and the name of the site to generate a site-specific secret.
|
||||
|
||||
|
||||
|
||||
## Benefits
|
||||
|
||||
- You don't need to think up a new strong password every time you make a new account - Master Password gives you the key for it.
|
||||
- You don't need to try remembering a password you created two years ago for that one account - Master Password just gives you the key for it.
|
||||
- You don't need to worry about getting into that account you made at work after you come home because you don't have your office passwords with you - Master Password is availale everywhere, even offline.
|
||||
- You don't need to try to keep password lists in sync or stored somewhere easily accessible - Master Password keys can be created anywhere.
|
||||
- You don't need to worry what you'll do if your computer dies or you need to log into your bank while you're in the airport transit zone - your Master Password keys are always available, even when starting empty.
|
||||
- You don't need to worry about your password manager website getting hacked, your phone getting duplicated, somebody taking a picture of your passwords book - Master Password stores no secrets.
|
||||
|
||||
|
||||
|
||||
## How does it work?
|
||||
|
||||
The details of how Master Password works [are available here](http://masterpasswordapp.com/algorithm.html).
|
||||
|
||||
In short:
|
||||
|
||||
master-key = SCRYPT( user-name, master-password )
|
||||
site-key = HMAC-SHA-256( site-name . site-counter, master-key )
|
||||
site-password = PW-TEMPLATE( site-key, site-template )
|
||||
|
||||
Master Password can derive the `site-password` in an entirely stateless manner. It is therefore better defined as a calculator than a manager. It is the user's responsibility to remember the inputs: `user-name`, `master-password`, `site-name`, `site-counter` and `site-template`.
|
||||
|
||||
We standardize `user-name` as your full name, `site-name` as the domain name of the site, `site-counter` to `1` (unless you explicitly increment it) and `site-template` to `Long Password`; as a result the only token the user really needs to remember actively is `master-password`.
|
||||
|
||||
|
||||
|
||||
## FAQ
|
||||
|
||||
1. If I lose my master password and need to set a new one, will I need to change all of my site passwords?
|
||||
|
||||
Yes. If your master password is compromised, it is only sensible for you to change all of your site passwords. Just like if you lose the keys in your pocket, you'll have to change all the locks they open. Master Password effectively enforces this security practice.
|
||||
|
||||
2. But what if I just forget my master password or I just want to change it to something else?
|
||||
|
||||
Sorry, still yes. Your master password is the secret component to your Master Password identity. If it changes, your identity changes. I wholly encourage you to think very carefully about what makes for a really memorable and good master password before just diving in with something lazy. A short phrase works great, eg. `banana coloured duckling`.
|
||||
|
||||
3. Doesn't this mean an attacker can reverse my master password from any of my site passwords?
|
||||
|
||||
Technically, yes. Practically, no.
|
||||
|
||||
You could argue that site passwords are "breadcrumbs" of your master password, but the same argument would suggest encrypted messages are breadcrumbs to the encryption key. Encryption works because it is computationally unfeasible to "guess" the encryption key that made the encrypted message, just like Master Password works because it is computationally unfeasible to "guess" your master password that made the site password.
|
||||
|
||||
4. The second step is just a HMAC-SHA-256, doesn't that make the SCRYPT completely pointless?
|
||||
|
||||
No. They are used for different reasons and one is not weaker than the other.
|
||||
|
||||
HMAC-SHA-256 is much faster to compute than SCRYPT, which leads some people to think "all an attacker needs to do is brute-force the SHA and ignore the SCRYPT". The reality is that the HMAC-SHA-256 guards a 64-byte authentication key (the `master-key`) which makes the search space for brute-forcing the HMAC wildly too large to compute.
|
||||
The `master-password` on the other hand, is only a simple phrase, which means its search space is much smaller. This is why it is guarded by a much tougher SCRYPT operation.
|
||||
|
||||
5. I have another question.
|
||||
|
||||
Please don't hesitate to [get in touch](#support), we're more than happy to answer all your Master Password questions. Any problems or suggestions can be reported [as GitHub issues](https://github.com/Lyndir/MasterPassword/issues).
|
||||
|
||||
|
||||
|
||||
|
||||
# Source Code
|
||||
|
||||
Master Password's algorithm is [documented](http://masterpasswordapp.com/algorithm.html) and its implementation is Free Software (GPLv3).
|
||||
|
||||
|
||||
|
||||
## Components
|
||||
|
||||
There are several components available here. As an end-user, you can currently use the iOS app, the Android app, the OS X app, the Java desktop app, the C CLI app or the Java CLI app. There are also several components that are useful for developers:
|
||||
|
||||
- `core/c`: This is the reference implementation of the Master Password algorithm, written in C.
|
||||
- `core/java/algorithm`: This is a Java implementation of the Master Password algorithm.
|
||||
- `core/java/model`: This is an object model to simplify use of Master Password by Java applications.
|
||||
- `core/java/tests`: These are Java integration tests designed to ensure Master Password performs as expected.
|
||||
- `platform-android`: This is the official Android implementation of Master Password in Java.
|
||||
- `platform-darwin`: This is the official iOS and OS X implementation of Master Password in Objective-C.
|
||||
- `platform-independent/cli-c`: This is the platform-independent console implementation of Master Password, written in C.
|
||||
- `platform-independent/cli-java`: This is the platform-independent console implementation of Master Password, written in Java.
|
||||
- `platform-independent/gui-java`: This is the platform-independent desktop implementation of Master Password, written in Java.
|
||||
- `platform-independent/web-js`: This is the platform-independent browser application for Master Password, written in JavaScript.
|
||||
|
||||
|
||||
|
||||
## Building and running
|
||||
|
||||
|
||||
### macOS or iOS
|
||||
|
||||
Make sure you have all relevant submodules checked out.
|
||||
|
||||
Go into `platform-darwin` and open `MasterPassword.xcworkspace` in Xcode. Select the desired target from the Scheme Selector and build, run or archive.
|
||||
|
||||
|
||||
### Web
|
||||
|
||||
Make sure you have all relevant submodules checked out.
|
||||
|
||||
Go into `platform-independent/web-js` and open `index.html` in your browser. You should be able to run this locally, there is no need for hosting or an application server.
|
||||
|
||||
|
||||
### Java
|
||||
|
||||
Go into the `gradle` directory and run `./gradlew build`. All Java components will then be built:
|
||||
|
||||
- `platform-independent/gui-java/build/distributions`:
|
||||
contains an archive with the Master Password Java GUI. Unpack it and run the `gui` script.
|
||||
- `platform-independent/cli-java/build/distributions`:
|
||||
contains an archive with the Master Password Java command-line interface. Unpack it and run the `cli` script.
|
||||
- `platform-android/build/outputs/apk`:
|
||||
contains the Android application package. Install it on your Android device.
|
||||
|
||||
Note that in order to build the Android application, you will need to have the Android SDK installed and either have the environment variable `ANDROID_HOME` set to its location or a `gradle/local.properties` file with its location, eg. (for Homebrew users who installed the SDK using `brew install android-sdk`):
|
||||
|
||||
sdk.dir=/usr/local/opt/android-sdk
|
||||
|
||||
|
||||
### Native CLI
|
||||
|
||||
Go into the `platform-independent/cli-c` directory and run `./build`. The native command-line client will then be built.
|
||||
|
||||
When the build completes, you will have an `mpw` binary you can use. You can copy it into your `PATH` or use the `./install` script to help you do so.
|
||||
|
||||
For example:
|
||||
|
||||
./build && sudo ./install
|
||||
mpw -h
|
||||
|
||||
Normally, this is all you need to do, however note that there are a few dependencies that need to be met, depending on which targets you are building (by default, only the `mpw` target is built):
|
||||
|
||||
- `mpw`
|
||||
|
||||
The C implementation depends either on `libsodium` or Tarsnap's `scrypt` and `openssl-dev`.
|
||||
|
||||
We recommend you install `libsodium`. If `libsodium` is not installed when `./build` is executed, the script will try to download and statically link Tarsnap's `scrypt` instead. Tarsnap's `scrypt` depends on you having `openssl-dev` installed.
|
||||
|
||||
If you have `mpw_color` enabled (it is enabled by default), the build also depends on `ncurses-dev` to communicate with the terminal.
|
||||
|
||||
- `mpw-bench`
|
||||
|
||||
This tool compares the performance of a few cryptographic algorithms, including bcrypt. The `./build` script will try to automatically download and statically link `bcrypt`.
|
||||
|
||||
- `mpw-tests`
|
||||
|
||||
This tool runs a suite of tests to ensure the correct passwords are being generated by the algorithm under various circumstances. The test suite is declared in `mpw-tests.xml` which needs to exist in the current working directory when running the tool. In addition, `libxml2` is used to parse the file, so this target depends on you having it installed when running `./build`.
|
||||
|
||||
|
||||
Finally, there are a few different ways you can modify the build process.
|
||||
|
||||
To build additional targets, set the `targets` environment variable:
|
||||
|
||||
targets='mpw mpw-tests' ./build
|
||||
|
||||
To pass additional compiler arguments, eg. add a library search path, pass them as arguments to the script:
|
||||
|
||||
./build -L/usr/local/lib
|
||||
|
||||
There are a few toggleable features, to change them, pass them as environment variables:
|
||||
|
||||
mpw_color=0 ./build
|
||||
|
||||
Currently, there is only one toggleable feature:
|
||||
|
||||
- `mpw_color`: [default: 1] Colorized Identicon, depends on `ncurses-dev`.
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
Feel free to contribute by forking the project, reporting issues or joining the discussion on:
|
||||
|
||||
- [Gitter](https://gitter.im/lyndir/MasterPassword)
|
||||
- #masterpassword (on chat.freenode.net)
|
||||
- #masterpassword:lyndir.com (on Matrix)
|
||||
- masterpassword@lyndir.com
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
masterpassword-android-2.3.apk
|
||||
@@ -1 +0,0 @@
|
||||
mpw-2.1-cli4-0-gf6b2287.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
../../MasterPassword/C/mpw-2.1-cli1-0-g10f1001.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
../../MasterPassword/C/mpw-2.1-cli2-2-g82c96dd.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
../../MasterPassword/C/mpw-2.1-cli3-0-g438daf2.tar.gz
|
||||
@@ -1 +0,0 @@
|
||||
../../MasterPassword/C/mpw-2.1-cli4-0-gf6b2287.tar.gz
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd "${BASH_SOURCE[0]%/*}"
|
||||
s3cmd sync --exclude '.git/**' --human-readable-sizes --no-preserve --acl-public --reduced-redundancy "${@:-.}" s3://masterpasswordapp.com/
|
||||
rsync -avPL --no-group "${@:-.}" satura.lyndir.com:/usr/local/www/masterpasswordapp.com/htdocs-secure/
|
||||
Submodule Site/mpw-js/js/mpw-js deleted from 9566261e5d
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user