├── .travis.yml
├── .gitignore
├── sf-pwgen.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcshareddata
│ └── xcschemes
│ │ └── sf-pwgen.xcscheme
└── project.pbxproj
├── Makefile
├── sf-pwgen-test
├── Info.plist
└── sf_pwgen_test.m
├── VERSIONS.md
├── README.md
├── SFPasswordAssistant.h
└── sf-pwgen.m
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | xcode_project: sf-pwgen.xcodeproj
3 | xcode_scheme: sf-pwgen
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | sf-pwgen
2 | *.o
3 |
4 | # Xcode / OS X
5 | .DS_Store
6 | *.pbxuser
7 | xcuserdata
8 | build
9 | *.xcworkspace
10 | *.dSYM
11 |
--------------------------------------------------------------------------------
/sf-pwgen.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | CC?=clang
2 | CFLAGS?=-Wall -Wextra -Os -fobjc-arc
3 | TARGET=sf-pwgen
4 | SRC=sf-pwgen.m
5 | LIBS=-framework Foundation -framework CoreFoundation -framework SecurityFoundation
6 |
7 | $(TARGET): $(SRC)
8 | $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LIBS)
9 |
10 | format:
11 | clang-format -i -style=Mozilla $(SRC) $(wildcard SecurityFoundation/*.h)
12 |
13 | clean:
14 | rm -f $(TARGET)
15 |
16 | .PHONY: clean
17 |
--------------------------------------------------------------------------------
/sf-pwgen-test/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/sf-pwgen-test/sf_pwgen_test.m:
--------------------------------------------------------------------------------
1 | //
2 | // sf_pwgen_test.m
3 | // sf-pwgen-test
4 | //
5 | // Created by Anders Bergh on 2019-04-13.
6 | // Copyright (c) 2019 Anders Bergh. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface sf_pwgen_test : XCTestCase
12 |
13 | @end
14 |
15 | @implementation sf_pwgen_test
16 |
17 | - (void)setUp {
18 | // Put setup code here. This method is called before the invocation of each test method in the class.
19 | }
20 |
21 | - (void)tearDown {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | - (void)testExample {
26 | // This is an example of a functional test case.
27 | // Use XCTAssert and related functions to verify your tests produce the correct results.
28 | }
29 |
30 | - (void)testPerformanceExample {
31 | // This is an example of a performance test case.
32 | [self measureBlock:^{
33 | // Put the code you want to measure the time of here.
34 | }];
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/VERSIONS.md:
--------------------------------------------------------------------------------
1 | # sf-pwgen version history
2 |
3 | ## 1.5 (2019-04-13)
4 | * Warn if passwords are shorter than requested. Thanks to @dancek for implementing this.
5 | * Updated Xcode project to fix Travis CI (had to add a unit test).
6 |
7 | ## 1.4 (2016-10-31)
8 | * Fix crash bug on Sierra.
9 |
10 | ## 1.3 (2014-04-17)
11 | * System requirements are now Mountain Lion (10.8) and later.
12 | * Show default password length and count in help output.
13 | * When generating a lot of passwords at once, only request a few so it doesn't hang.
14 |
15 | ## 1.2 (2014-03-29)
16 | * Xcode project added
17 | * Ported to Objective-C with ARC (instead of C + Core Foundation)
18 | * Added -L, --language to generate passwords in other languages.
19 | * Renamed project to pwgen (the whole project, not just the tool).
20 | * Added -v, --version.
21 | * Renamed tool to sf-pwgen from pwgen. The old name was already used by another project.
22 |
23 | ## 1.1.1 (2013-03-02)
24 | * Relicense the header from no license to Public Domain
25 |
26 | ## 1.1 (2013-02-11)
27 |
28 | * More functions documented in header.
29 | * Assume defaults.
30 | * Print output using UTF-8.
31 |
32 | ## 1.0 (2012-07-23)
33 |
34 | * Initial release.
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # sf-pwgen
2 | [](https://travis-ci.org/anders/pwgen)
3 |
4 | `sf-pwgen` is a command line tool which generates passwords using the
5 | SecurityFoundation framework in macOS. It runs on Mountain Lion and later.
6 |
7 | sf-pwgen 1.5: macOS password generator
8 | Anders Bergh
9 |
10 | usage: ./sf-pwgen [options]
11 |
12 | Available options are:
13 | -a, --algorithm Available algorithms: memorable, random, letters, alphanumeric, numbers.
14 | The default is `memorable'.
15 | -c, --count The number of passwords to generate (default: 5).
16 | -l, --length Desired length of the generated passwords (default: 12).
17 | -L, --language Generate passwords in a specified language.
18 | Languages: en, de, es, fr, it, nl, pt, jp.
19 | Note that this feature is broken and will produce garbage, bug: rdar://14889281
20 | -v, --version Print the version number and exit.
21 | -h, --help Print this message.
22 |
23 |
24 | ## SFPasswordAssistant.h
25 | This project also includes SFPasswordAssistant.h, which is a
26 | reverse-engineered header for Apple's password assistant API
27 | (used in Keychain Access.app, etc). It should work on Snow Leopard
28 | and above.
29 |
30 | To use it simply include `SFPasswordAssistant.h` in your project
31 | and link to `SecurityFoundation.framework`.
32 |
--------------------------------------------------------------------------------
/SFPasswordAssistant.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Released into the public domain.
3 | *
4 | * Written by Anders Bergh in 2013.
5 | */
6 |
7 | #ifndef SFPASSWORDASSISTANT_H
8 | #define SFPASSWORDASSISTANT_H
9 |
10 | #include
11 |
12 | typedef struct SFPWAContext *SFPWAContextRef;
13 |
14 | typedef enum {
15 | kSFPWAAlgorithmMemorable = 0,
16 | kSFPWAAlgorithmRandom = 1,
17 | kSFPWAAlgorithmLetters = 2, /* FIPS-181 compliant */
18 | kSFPWAAlgorithmAlphanumeric = 3,
19 | kSFPWAAlgorithmNumbers = 4
20 | } SFPWAAlgorithm;
21 |
22 | // bool SFPWAStdStringInDictionary(SFPWAContextRef ctx, std::string s);
23 | bool SFPWACStringInDictionary(SFPWAContextRef ctx, const char *string);
24 | SFPWAContextRef SFPWAContextCreate(void);
25 | SFPWAContextRef SFPWAContextCreateWithDefaults(void);
26 | void SFPWAContextLoadDictionaries(SFPWAContextRef ctx, CFArrayRef langs,
27 | bool unknown);
28 | void SFPWAContextRelease(SFPWAContextRef ctx);
29 |
30 | /* Example:
31 | *
32 | * SFPWAPasswordEvaluator(ctx, CFSTR("password"), 0, policy) ->
33 | * {
34 | * "Entropy": "123.4567",
35 | * "Quality": 80,
36 | * "Variety": 3,
37 | * "Errors": [
38 | * { "Value": "-27099", "Message": "Mix upper and lower case, punctuation,
39 | * and numbers" }
40 | * ]
41 | * }
42 | */
43 | CFDictionaryRef SFPWAPasswordEvaluator(SFPWAContextRef ctx,
44 | CFStringRef password, int unknown,
45 | CFDictionaryRef policy);
46 |
47 | CFMutableArrayRef SFPWAPasswordSuggest(SFPWAContextRef ctx,
48 | CFDictionaryRef policy, int length,
49 | int unknown, int count,
50 | SFPWAAlgorithm algorithm);
51 | CFPropertyListRef SFPWAPolicyCopyDefault(void);
52 | CFPropertyListRef SFPWAPolicyCopyFromFile(const char *path);
53 | CFArrayRef SFPWAPolicyLanguages(CFDictionaryRef policy);
54 | void SFPWAPolicyParse(SFPWAContextRef ctx, CFDictionaryRef policy);
55 | CFStringRef SFPWARandomWord(SFPWAContextRef ctx, unsigned int length);
56 |
57 | #endif /* SFPASSWORDASSISTANT_H */
58 |
--------------------------------------------------------------------------------
/sf-pwgen.xcodeproj/xcshareddata/xcschemes/sf-pwgen.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
83 |
85 |
91 |
92 |
93 |
94 |
96 |
97 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/sf-pwgen.m:
--------------------------------------------------------------------------------
1 | /*
2 | * sf-pwgen.m -- macOS command line password generator
3 | * Copyright (c) 2012-2019 Anders Bergh
4 | *
5 | * This software is provided 'as-is', without any express or implied
6 | * warranty. In no event will the authors be held liable for any damages
7 | * arising from the use of this software.
8 | *
9 | * Permission is granted to anyone to use this software for any purpose,
10 | * including commercial applications, and to alter it and redistribute it
11 | * freely, subject to the following restrictions:
12 | *
13 | * 1. The origin of this software must not be misrepresented; you must not
14 | * claim that you wrote the original software. If you use this software
15 | * in a product, an acknowledgment in the product documentation would be
16 | * appreciated but is not required.
17 | *
18 | * 2. Altered source versions must be plainly marked as such, and must
19 | * not be misrepresented as being the original software.
20 | *
21 | * 3. This notice may not be removed or altered from any source
22 | * distribution.
23 | */
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 |
31 | #import
32 | #import "SFPasswordAssistant.h"
33 |
34 | #define PROJECT "sf-pwgen"
35 | #define VERSION "1.5"
36 |
37 | // The length limit used to be the same as in Keychain Access (min 8, max 31).
38 | #define PASS_MIN_LENGTH 8
39 | #define PASS_MAX_LENGTH 128
40 | #define PASS_DEFAULT_LENGTH 12
41 | #define PASS_DEFAULT_COUNT 5
42 |
43 | // Max number of passwords generated at a time.
44 | #define PASS_REQUEST_COUNT 15
45 |
46 | static void usage(const char *argv0) {
47 | // to get the available languages
48 | NSDictionary *policy =
49 | (NSDictionary *)CFBridgingRelease(SFPWAPolicyCopyDefault());
50 | NSArray *languages =
51 | [policy[@"Languages-Evaluate"] componentsSeparatedByString:@","];
52 |
53 | printf(PROJECT " " VERSION ": macOS password generator\n");
54 | printf("Anders Bergh \n\n");
55 |
56 | printf("usage: %s [options]\n\n", argv0);
57 | printf("Available options are:\n");
58 | printf(" -a, --algorithm Available algorithms: memorable, random, "
59 | "letters, alphanumeric, numbers.\n");
60 | printf(" The default is `memorable'.\n");
61 | printf(" -c, --count The number of passwords to generate "
62 | "(default: %d).\n",
63 | PASS_DEFAULT_COUNT);
64 | printf(" -l, --length Desired length of the generated passwords "
65 | "(default: %d).\n",
66 | PASS_DEFAULT_LENGTH);
67 | printf(" -L, --language Generate passwords in a specified language.\n");
68 | printf(" Languages: %s.\n",
69 | [[languages componentsJoinedByString:@", "] UTF8String]);
70 | printf(" Note that this feature is broken and will "
71 | "produce garbage, bug: rdar://14889281\n");
72 | printf(" -v, --version Print the version number and exit.\n");
73 | printf(" -h, --help Print this message.\n");
74 | }
75 |
76 | int main(int argc, char *argv[]) {
77 | // Default options
78 | int count = PASS_DEFAULT_COUNT;
79 | int length = PASS_DEFAULT_LENGTH;
80 | SFPWAAlgorithm algorithm = kSFPWAAlgorithmMemorable;
81 | NSString *language = @"en";
82 | bool warn_about_length = false;
83 |
84 | const struct option longopts[] = {
85 | { "algorithm", required_argument, NULL, 'a' },
86 | { "count", required_argument, NULL, 'c' },
87 | { "length", required_argument, NULL, 'l' },
88 | { "language", required_argument, NULL, 'L' },
89 | { "version", no_argument, NULL, 'v' },
90 | { "help", no_argument, NULL, 'h' },
91 | { NULL, 0, NULL, 0 }
92 | };
93 |
94 | char ch;
95 | while ((ch = getopt_long(argc, argv, "c:a:l:L:vh", longopts, NULL)) != -1) {
96 | switch (ch) {
97 | case 'v':
98 | printf(PROJECT " " VERSION "\n");
99 | exit(EXIT_SUCCESS);
100 | break;
101 |
102 | case 'a':
103 | if (strcmp(optarg, "memorable") == 0) {
104 | algorithm = kSFPWAAlgorithmMemorable;
105 | } else if (strcmp(optarg, "random") == 0) {
106 | algorithm = kSFPWAAlgorithmRandom;
107 | } else if (strcmp(optarg, "letters") == 0) {
108 | algorithm = kSFPWAAlgorithmLetters;
109 | } else if (strcmp(optarg, "alphanumeric") == 0) {
110 | algorithm = kSFPWAAlgorithmAlphanumeric;
111 | } else if (strcmp(optarg, "numbers") == 0) {
112 | algorithm = kSFPWAAlgorithmNumbers;
113 | } else {
114 | fprintf(stderr, "error: unknown algorithm.\n");
115 | usage(argv[0]);
116 | return EXIT_FAILURE;
117 | }
118 |
119 | break;
120 |
121 | case 'c':
122 | count = atoi(optarg);
123 | break;
124 |
125 | case 'l':
126 | length = atoi(optarg);
127 | // the user requested a specific length; warn if it's not fulfilled.
128 | warn_about_length = true;
129 | break;
130 |
131 | case 'L':
132 | language = [NSString stringWithUTF8String:optarg];
133 | break;
134 |
135 | default:
136 | usage(argv[0]);
137 | return EXIT_FAILURE;
138 | }
139 | }
140 |
141 | if (count < 1) {
142 | count = 1;
143 | }
144 |
145 | if (length < PASS_MIN_LENGTH) {
146 | length = PASS_MIN_LENGTH;
147 | } else if (length > PASS_MAX_LENGTH) {
148 | length = PASS_MAX_LENGTH;
149 | }
150 |
151 | NSDictionary *policy =
152 | (NSDictionary *)CFBridgingRelease(SFPWAPolicyCopyDefault());
153 | assert(policy != NULL);
154 |
155 | SFPWAContextRef ctx = SFPWAContextCreateWithDefaults();
156 | assert(ctx != NULL);
157 |
158 | if (language) {
159 | NSArray *languages =
160 | [policy[@"Languages-Evaluate"] componentsSeparatedByString:@","];
161 | if ([languages containsObject:language]) {
162 | SFPWAContextLoadDictionaries(ctx, (__bridge CFArrayRef) @[ language ], 1);
163 | } else {
164 | fprintf(stderr,
165 | "warning: requested language `%s' unavailable, try one of: %s.\n",
166 | [language UTF8String],
167 | [[languages componentsJoinedByString:@", "] UTF8String]);
168 | }
169 | }
170 |
171 | while (count > 0) {
172 | int n = count;
173 | if (n > PASS_REQUEST_COUNT) {
174 | n = PASS_REQUEST_COUNT;
175 | }
176 |
177 | NSMutableArray *suggestions =
178 | (__bridge NSMutableArray *)SFPWAPasswordSuggest(
179 | ctx, (__bridge CFDictionaryRef)policy, length, 0, n, algorithm);
180 | assert(suggestions != NULL);
181 |
182 | for (NSString *s in suggestions) {
183 | if (warn_about_length && [s length] < (unsigned long) length) {
184 | fprintf(stderr,
185 | "warning: at least one password generated is shorter than "
186 | "the requested length\n");
187 | warn_about_length = false;
188 | }
189 | printf("%s\n", [s UTF8String]);
190 | }
191 |
192 | count -= [suggestions count];
193 | }
194 |
195 | SFPWAContextRelease(ctx);
196 |
197 | return EXIT_SUCCESS;
198 | }
199 |
--------------------------------------------------------------------------------
/sf-pwgen.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 9A07D7B416E1BD380042A1BE /* sf-pwgen.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A07D7B316E1BD380042A1BE /* sf-pwgen.m */; };
11 | 9A07D7B616E1BD870042A1BE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A07D7B516E1BD870042A1BE /* Foundation.framework */; };
12 | 9A850B2216E1B78F001E2417 /* SecurityFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A850B2116E1B78F001E2417 /* SecurityFoundation.framework */; };
13 | 9AD5B5A02261926000D93A1F /* sf_pwgen_test.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AD5B59F2261926000D93A1F /* sf_pwgen_test.m */; };
14 | /* End PBXBuildFile section */
15 |
16 | /* Begin PBXCopyFilesBuildPhase section */
17 | 9A850B0E16E1B750001E2417 /* CopyFiles */ = {
18 | isa = PBXCopyFilesBuildPhase;
19 | buildActionMask = 2147483647;
20 | dstPath = /usr/share/man/man1/;
21 | dstSubfolderSpec = 0;
22 | files = (
23 | );
24 | runOnlyForDeploymentPostprocessing = 1;
25 | };
26 | /* End PBXCopyFilesBuildPhase section */
27 |
28 | /* Begin PBXFileReference section */
29 | 9A07D7B316E1BD380042A1BE /* sf-pwgen.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = "sf-pwgen.m"; sourceTree = SOURCE_ROOT; };
30 | 9A07D7B516E1BD870042A1BE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
31 | 9A850B1016E1B750001E2417 /* sf-pwgen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "sf-pwgen"; sourceTree = BUILT_PRODUCTS_DIR; };
32 | 9A850B2116E1B78F001E2417 /* SecurityFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityFoundation.framework; path = System/Library/Frameworks/SecurityFoundation.framework; sourceTree = SDKROOT; };
33 | 9A92F282182BDCD900CA808B /* SFPasswordAssistant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFPasswordAssistant.h; sourceTree = SOURCE_ROOT; };
34 | 9AD5B59D2261926000D93A1F /* sf-pwgen-test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "sf-pwgen-test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 9AD5B59F2261926000D93A1F /* sf_pwgen_test.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = sf_pwgen_test.m; sourceTree = ""; };
36 | 9AD5B5A12261926000D93A1F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
37 | /* End PBXFileReference section */
38 |
39 | /* Begin PBXFrameworksBuildPhase section */
40 | 9A850B0D16E1B750001E2417 /* Frameworks */ = {
41 | isa = PBXFrameworksBuildPhase;
42 | buildActionMask = 2147483647;
43 | files = (
44 | 9A07D7B616E1BD870042A1BE /* Foundation.framework in Frameworks */,
45 | 9A850B2216E1B78F001E2417 /* SecurityFoundation.framework in Frameworks */,
46 | );
47 | runOnlyForDeploymentPostprocessing = 0;
48 | };
49 | 9AD5B59A2261926000D93A1F /* Frameworks */ = {
50 | isa = PBXFrameworksBuildPhase;
51 | buildActionMask = 2147483647;
52 | files = (
53 | );
54 | runOnlyForDeploymentPostprocessing = 0;
55 | };
56 | /* End PBXFrameworksBuildPhase section */
57 |
58 | /* Begin PBXGroup section */
59 | 9A850B0716E1B750001E2417 = {
60 | isa = PBXGroup;
61 | children = (
62 | 9A850B1516E1B750001E2417 /* sf-pwgen */,
63 | 9AD5B59E2261926000D93A1F /* sf-pwgen-test */,
64 | 9A850B1216E1B750001E2417 /* Frameworks */,
65 | 9A850B1116E1B750001E2417 /* Products */,
66 | );
67 | indentWidth = 2;
68 | sourceTree = "";
69 | };
70 | 9A850B1116E1B750001E2417 /* Products */ = {
71 | isa = PBXGroup;
72 | children = (
73 | 9A850B1016E1B750001E2417 /* sf-pwgen */,
74 | 9AD5B59D2261926000D93A1F /* sf-pwgen-test.xctest */,
75 | );
76 | name = Products;
77 | sourceTree = "";
78 | };
79 | 9A850B1216E1B750001E2417 /* Frameworks */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 9A07D7B516E1BD870042A1BE /* Foundation.framework */,
83 | 9A850B2116E1B78F001E2417 /* SecurityFoundation.framework */,
84 | );
85 | name = Frameworks;
86 | sourceTree = "";
87 | };
88 | 9A850B1516E1B750001E2417 /* sf-pwgen */ = {
89 | isa = PBXGroup;
90 | children = (
91 | 9A92F282182BDCD900CA808B /* SFPasswordAssistant.h */,
92 | 9A07D7B316E1BD380042A1BE /* sf-pwgen.m */,
93 | );
94 | path = "sf-pwgen";
95 | sourceTree = "";
96 | };
97 | 9AD5B59E2261926000D93A1F /* sf-pwgen-test */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 9AD5B59F2261926000D93A1F /* sf_pwgen_test.m */,
101 | 9AD5B5A12261926000D93A1F /* Info.plist */,
102 | );
103 | path = "sf-pwgen-test";
104 | sourceTree = "";
105 | };
106 | /* End PBXGroup section */
107 |
108 | /* Begin PBXNativeTarget section */
109 | 9A850B0F16E1B750001E2417 /* sf-pwgen */ = {
110 | isa = PBXNativeTarget;
111 | buildConfigurationList = 9A850B1C16E1B750001E2417 /* Build configuration list for PBXNativeTarget "sf-pwgen" */;
112 | buildPhases = (
113 | 9A850B0C16E1B750001E2417 /* Sources */,
114 | 9A850B0D16E1B750001E2417 /* Frameworks */,
115 | 9A850B0E16E1B750001E2417 /* CopyFiles */,
116 | );
117 | buildRules = (
118 | );
119 | dependencies = (
120 | );
121 | name = "sf-pwgen";
122 | productName = "sf-pwgen";
123 | productReference = 9A850B1016E1B750001E2417 /* sf-pwgen */;
124 | productType = "com.apple.product-type.tool";
125 | };
126 | 9AD5B59C2261926000D93A1F /* sf-pwgen-test */ = {
127 | isa = PBXNativeTarget;
128 | buildConfigurationList = 9AD5B5A42261926000D93A1F /* Build configuration list for PBXNativeTarget "sf-pwgen-test" */;
129 | buildPhases = (
130 | 9AD5B5992261926000D93A1F /* Sources */,
131 | 9AD5B59A2261926000D93A1F /* Frameworks */,
132 | 9AD5B59B2261926000D93A1F /* Resources */,
133 | );
134 | buildRules = (
135 | );
136 | dependencies = (
137 | );
138 | name = "sf-pwgen-test";
139 | productName = "sf-pwgen-test";
140 | productReference = 9AD5B59D2261926000D93A1F /* sf-pwgen-test.xctest */;
141 | productType = "com.apple.product-type.bundle.unit-test";
142 | };
143 | /* End PBXNativeTarget section */
144 |
145 | /* Begin PBXProject section */
146 | 9A850B0816E1B750001E2417 /* Project object */ = {
147 | isa = PBXProject;
148 | attributes = {
149 | LastUpgradeCheck = 0710;
150 | ORGANIZATIONNAME = "Anders Bergh";
151 | TargetAttributes = {
152 | 9A850B0F16E1B750001E2417 = {
153 | ProvisioningStyle = Automatic;
154 | };
155 | 9AD5B59C2261926000D93A1F = {
156 | CreatedOnToolsVersion = 10.2;
157 | ProvisioningStyle = Automatic;
158 | };
159 | };
160 | };
161 | buildConfigurationList = 9A850B0B16E1B750001E2417 /* Build configuration list for PBXProject "sf-pwgen" */;
162 | compatibilityVersion = "Xcode 3.2";
163 | developmentRegion = English;
164 | hasScannedForEncodings = 0;
165 | knownRegions = (
166 | English,
167 | en,
168 | );
169 | mainGroup = 9A850B0716E1B750001E2417;
170 | productRefGroup = 9A850B1116E1B750001E2417 /* Products */;
171 | projectDirPath = "";
172 | projectRoot = "";
173 | targets = (
174 | 9A850B0F16E1B750001E2417 /* sf-pwgen */,
175 | 9AD5B59C2261926000D93A1F /* sf-pwgen-test */,
176 | );
177 | };
178 | /* End PBXProject section */
179 |
180 | /* Begin PBXResourcesBuildPhase section */
181 | 9AD5B59B2261926000D93A1F /* Resources */ = {
182 | isa = PBXResourcesBuildPhase;
183 | buildActionMask = 2147483647;
184 | files = (
185 | );
186 | runOnlyForDeploymentPostprocessing = 0;
187 | };
188 | /* End PBXResourcesBuildPhase section */
189 |
190 | /* Begin PBXSourcesBuildPhase section */
191 | 9A850B0C16E1B750001E2417 /* Sources */ = {
192 | isa = PBXSourcesBuildPhase;
193 | buildActionMask = 2147483647;
194 | files = (
195 | 9A07D7B416E1BD380042A1BE /* sf-pwgen.m in Sources */,
196 | );
197 | runOnlyForDeploymentPostprocessing = 0;
198 | };
199 | 9AD5B5992261926000D93A1F /* Sources */ = {
200 | isa = PBXSourcesBuildPhase;
201 | buildActionMask = 2147483647;
202 | files = (
203 | 9AD5B5A02261926000D93A1F /* sf_pwgen_test.m in Sources */,
204 | );
205 | runOnlyForDeploymentPostprocessing = 0;
206 | };
207 | /* End PBXSourcesBuildPhase section */
208 |
209 | /* Begin XCBuildConfiguration section */
210 | 9A850B1A16E1B750001E2417 /* Debug */ = {
211 | isa = XCBuildConfiguration;
212 | buildSettings = {
213 | ALWAYS_SEARCH_USER_PATHS = NO;
214 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
215 | CLANG_CXX_LIBRARY = "libc++";
216 | CLANG_WARN_CONSTANT_CONVERSION = YES;
217 | CLANG_WARN_EMPTY_BODY = YES;
218 | CLANG_WARN_ENUM_CONVERSION = YES;
219 | CLANG_WARN_INT_CONVERSION = YES;
220 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
221 | COPY_PHASE_STRIP = NO;
222 | ENABLE_TESTABILITY = YES;
223 | GCC_C_LANGUAGE_STANDARD = gnu99;
224 | GCC_DYNAMIC_NO_PIC = NO;
225 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
226 | GCC_OPTIMIZATION_LEVEL = 0;
227 | GCC_PREPROCESSOR_DEFINITIONS = (
228 | "DEBUG=1",
229 | "$(inherited)",
230 | );
231 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
232 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
233 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
234 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
235 | GCC_WARN_UNUSED_VARIABLE = YES;
236 | MACOSX_DEPLOYMENT_TARGET = "";
237 | ONLY_ACTIVE_ARCH = YES;
238 | SDKROOT = macosx;
239 | };
240 | name = Debug;
241 | };
242 | 9A850B1B16E1B750001E2417 /* Release */ = {
243 | isa = XCBuildConfiguration;
244 | buildSettings = {
245 | ALWAYS_SEARCH_USER_PATHS = NO;
246 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
247 | CLANG_CXX_LIBRARY = "libc++";
248 | CLANG_WARN_CONSTANT_CONVERSION = YES;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INT_CONVERSION = YES;
252 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
253 | COPY_PHASE_STRIP = YES;
254 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
255 | GCC_C_LANGUAGE_STANDARD = gnu99;
256 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
257 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
258 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
259 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
260 | GCC_WARN_UNUSED_VARIABLE = YES;
261 | MACOSX_DEPLOYMENT_TARGET = "";
262 | SDKROOT = macosx;
263 | };
264 | name = Release;
265 | };
266 | 9A850B1D16E1B750001E2417 /* Debug */ = {
267 | isa = XCBuildConfiguration;
268 | buildSettings = {
269 | CLANG_ENABLE_OBJC_ARC = YES;
270 | CODE_SIGN_STYLE = Automatic;
271 | CURRENT_PROJECT_VERSION = 1.5;
272 | MACOSX_DEPLOYMENT_TARGET = 10.6;
273 | PRODUCT_NAME = "$(TARGET_NAME)";
274 | };
275 | name = Debug;
276 | };
277 | 9A850B1E16E1B750001E2417 /* Release */ = {
278 | isa = XCBuildConfiguration;
279 | buildSettings = {
280 | CLANG_ENABLE_OBJC_ARC = YES;
281 | CODE_SIGN_STYLE = Automatic;
282 | CURRENT_PROJECT_VERSION = 1.5;
283 | MACOSX_DEPLOYMENT_TARGET = 10.6;
284 | PRODUCT_NAME = "$(TARGET_NAME)";
285 | };
286 | name = Release;
287 | };
288 | 9AD5B5A22261926000D93A1F /* Debug */ = {
289 | isa = XCBuildConfiguration;
290 | buildSettings = {
291 | CLANG_ANALYZER_NONNULL = YES;
292 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
293 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
294 | CLANG_ENABLE_MODULES = YES;
295 | CLANG_ENABLE_OBJC_ARC = YES;
296 | CLANG_ENABLE_OBJC_WEAK = YES;
297 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
298 | CLANG_WARN_BOOL_CONVERSION = YES;
299 | CLANG_WARN_COMMA = YES;
300 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
301 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
302 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
303 | CLANG_WARN_INFINITE_RECURSION = YES;
304 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
305 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
306 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
307 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
308 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
309 | CLANG_WARN_STRICT_PROTOTYPES = YES;
310 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
311 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
312 | CLANG_WARN_UNREACHABLE_CODE = YES;
313 | CODE_SIGN_IDENTITY = "-";
314 | CODE_SIGN_STYLE = Automatic;
315 | COMBINE_HIDPI_IMAGES = YES;
316 | DEBUG_INFORMATION_FORMAT = dwarf;
317 | ENABLE_STRICT_OBJC_MSGSEND = YES;
318 | GCC_C_LANGUAGE_STANDARD = gnu11;
319 | GCC_NO_COMMON_BLOCKS = YES;
320 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
321 | GCC_WARN_UNDECLARED_SELECTOR = YES;
322 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
323 | GCC_WARN_UNUSED_FUNCTION = YES;
324 | INFOPLIST_FILE = "sf-pwgen-test/Info.plist";
325 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
326 | MACOSX_DEPLOYMENT_TARGET = 10.14;
327 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
328 | MTL_FAST_MATH = YES;
329 | PRODUCT_BUNDLE_IDENTIFIER = "se.fgsfd.sf-pwgen-test";
330 | PRODUCT_NAME = "$(TARGET_NAME)";
331 | };
332 | name = Debug;
333 | };
334 | 9AD5B5A32261926000D93A1F /* Release */ = {
335 | isa = XCBuildConfiguration;
336 | buildSettings = {
337 | CLANG_ANALYZER_NONNULL = YES;
338 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
339 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
340 | CLANG_ENABLE_MODULES = YES;
341 | CLANG_ENABLE_OBJC_ARC = YES;
342 | CLANG_ENABLE_OBJC_WEAK = YES;
343 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
344 | CLANG_WARN_BOOL_CONVERSION = YES;
345 | CLANG_WARN_COMMA = YES;
346 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
348 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
349 | CLANG_WARN_INFINITE_RECURSION = YES;
350 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
351 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
352 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
353 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
354 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
355 | CLANG_WARN_STRICT_PROTOTYPES = YES;
356 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
357 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
358 | CLANG_WARN_UNREACHABLE_CODE = YES;
359 | CODE_SIGN_IDENTITY = "-";
360 | CODE_SIGN_STYLE = Automatic;
361 | COMBINE_HIDPI_IMAGES = YES;
362 | COPY_PHASE_STRIP = NO;
363 | ENABLE_NS_ASSERTIONS = NO;
364 | ENABLE_STRICT_OBJC_MSGSEND = YES;
365 | GCC_C_LANGUAGE_STANDARD = gnu11;
366 | GCC_NO_COMMON_BLOCKS = YES;
367 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
368 | GCC_WARN_UNDECLARED_SELECTOR = YES;
369 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
370 | GCC_WARN_UNUSED_FUNCTION = YES;
371 | INFOPLIST_FILE = "sf-pwgen-test/Info.plist";
372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
373 | MACOSX_DEPLOYMENT_TARGET = 10.14;
374 | MTL_ENABLE_DEBUG_INFO = NO;
375 | MTL_FAST_MATH = YES;
376 | PRODUCT_BUNDLE_IDENTIFIER = "se.fgsfd.sf-pwgen-test";
377 | PRODUCT_NAME = "$(TARGET_NAME)";
378 | };
379 | name = Release;
380 | };
381 | /* End XCBuildConfiguration section */
382 |
383 | /* Begin XCConfigurationList section */
384 | 9A850B0B16E1B750001E2417 /* Build configuration list for PBXProject "sf-pwgen" */ = {
385 | isa = XCConfigurationList;
386 | buildConfigurations = (
387 | 9A850B1A16E1B750001E2417 /* Debug */,
388 | 9A850B1B16E1B750001E2417 /* Release */,
389 | );
390 | defaultConfigurationIsVisible = 0;
391 | defaultConfigurationName = Release;
392 | };
393 | 9A850B1C16E1B750001E2417 /* Build configuration list for PBXNativeTarget "sf-pwgen" */ = {
394 | isa = XCConfigurationList;
395 | buildConfigurations = (
396 | 9A850B1D16E1B750001E2417 /* Debug */,
397 | 9A850B1E16E1B750001E2417 /* Release */,
398 | );
399 | defaultConfigurationIsVisible = 0;
400 | defaultConfigurationName = Release;
401 | };
402 | 9AD5B5A42261926000D93A1F /* Build configuration list for PBXNativeTarget "sf-pwgen-test" */ = {
403 | isa = XCConfigurationList;
404 | buildConfigurations = (
405 | 9AD5B5A22261926000D93A1F /* Debug */,
406 | 9AD5B5A32261926000D93A1F /* Release */,
407 | );
408 | defaultConfigurationIsVisible = 0;
409 | defaultConfigurationName = Release;
410 | };
411 | /* End XCConfigurationList section */
412 | };
413 | rootObject = 9A850B0816E1B750001E2417 /* Project object */;
414 | }
415 |
--------------------------------------------------------------------------------