2 // si-73-secpasswordgenerate.c
7 #include <Security/SecPasswordGenerate.h>
8 #include <utilities/SecCFRelease.h>
9 #include "Security_regressions.h"
12 static void test_password_generate(bool ok
, SecPasswordType type
, int n
,...)
19 CFMutableDictionaryRef passwordRequirements
= NULL
;
20 CFStringRef password
= NULL
;
21 CFErrorRef error
= NULL
;
23 passwordRequirements
= CFDictionaryCreateMutable(NULL
, 0, NULL
, NULL
);
26 key
= va_arg(argp
, CFTypeRef
);
27 value
= va_arg(argp
, CFTypeRef
);
28 CFDictionaryAddValue(passwordRequirements
, key
, value
);
31 password
= SecPasswordGenerate(type
, &error
, passwordRequirements
);
36 if((password
==NULL
) || (error
!=NULL
))
45 CFReleaseSafe(password
);
46 CFReleaseSafe(passwordRequirements
);
52 static void tests(void)
54 CFErrorRef error
= NULL
;
55 CFStringRef password
= NULL
;
57 //Create dictionary for common required character sets
58 CFCharacterSetRef uppercaseLetterCharacterSet
= CFCharacterSetGetPredefined(kCFCharacterSetUppercaseLetter
);
59 CFCharacterSetRef lowercaseLetterCharacterSet
= CFCharacterSetGetPredefined(kCFCharacterSetLowercaseLetter
);
60 CFCharacterSetRef decimalDigitCharacterSet
= CFCharacterSetGetPredefined(kCFCharacterSetDecimalDigit
);
62 CFMutableArrayRef requiredCharacterSets
= CFArrayCreateMutable(NULL
, 0, &kCFTypeArrayCallBacks
);
63 CFArrayAppendValue(requiredCharacterSets
, uppercaseLetterCharacterSet
);
64 CFArrayAppendValue(requiredCharacterSets
, lowercaseLetterCharacterSet
);
65 CFArrayAppendValue(requiredCharacterSets
, decimalDigitCharacterSet
);
67 //Create common CFNumbers
80 CFNumberRef cf2
= CFNumberCreate(NULL
, kCFNumberIntType
, &i2
);
81 CFNumberRef cf4
= CFNumberCreate(NULL
, kCFNumberIntType
, &i4
);
82 CFNumberRef cf5
= CFNumberCreate(NULL
, kCFNumberIntType
, &i5
);
83 CFNumberRef cf6
= CFNumberCreate(NULL
, kCFNumberIntType
, &i6
);
84 CFNumberRef cf12
= CFNumberCreate(NULL
, kCFNumberIntType
, &i12
);
85 CFNumberRef cf19
= CFNumberCreate(NULL
, kCFNumberIntType
, &i19
);
86 CFNumberRef cf20
= CFNumberCreate(NULL
, kCFNumberIntType
, &i20
);
87 CFNumberRef cf23
= CFNumberCreate(NULL
, kCFNumberIntType
, &i23
);
88 CFNumberRef cf24
= CFNumberCreate(NULL
, kCFNumberIntType
, &i24
);
89 CFNumberRef cf32
= CFNumberCreate(NULL
, kCFNumberIntType
, &i32
);
90 CFNumberRef cf56
= CFNumberCreate(NULL
, kCFNumberIntType
, &i56
);
93 //generates random digit string
94 is(true, (password
= SecPasswordCreateWithRandomDigits(8, &error
)) != NULL
) ;
95 CFReleaseNull(password
);
97 is(true, (password
= SecPasswordCreateWithRandomDigits(7, &error
)) != NULL
) ;
98 CFReleaseNull(password
);
100 is(true, (password
= SecPasswordCreateWithRandomDigits(6, &error
)) != NULL
) ;
101 CFReleaseNull(password
);
103 is(true, (password
= SecPasswordCreateWithRandomDigits(5, &error
)) != NULL
) ;
104 CFReleaseNull(password
);
107 test_password_generate(true, kSecPasswordTypePIN
, 1,
108 kSecPasswordDefaultForType
, CFSTR("true"));
110 //test default icloud recovery code
111 test_password_generate(true, kSecPasswordTypeiCloudRecovery
, 1,
112 kSecPasswordDefaultForType
, CFSTR("true"));
115 test_password_generate(true, kSecPasswordTypeWifi
, 1,
116 kSecPasswordDefaultForType
, CFSTR("true"));
118 //test default safari
119 test_password_generate(true, kSecPasswordTypeSafari
, 1,
120 kSecPasswordDefaultForType
, CFSTR("true"));
122 //test icloud recovery code generation
123 test_password_generate(true, kSecPasswordTypeiCloudRecovery
, 1,
124 kSecPasswordDefaultForType
, CFSTR("true"));
127 test_password_generate(true, kSecPasswordTypeWifi
, 4,
128 kSecPasswordMinLengthKey
, cf20
,
129 kSecPasswordMaxLengthKey
, cf32
,
130 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
131 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
133 //test with max == min
134 test_password_generate(true, kSecPasswordTypeWifi
, 4,
135 kSecPasswordMinLengthKey
, cf24
,
136 kSecPasswordMaxLengthKey
, cf24
,
137 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
138 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
140 //test disallowed characters
141 test_password_generate(true, kSecPasswordTypeWifi
, 5,
142 kSecPasswordMinLengthKey
, cf24
,
143 kSecPasswordMaxLengthKey
, cf24
,
144 kSecPasswordAllowedCharactersKey
, CFSTR("abcdefghijklmnopqrstuvwxyz0123456789"),
145 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
146 kSecPasswordDisallowedCharacters
, CFSTR("aidfl"));
149 //test can't start with characters
150 test_password_generate(true, kSecPasswordTypeWifi
, 5,
151 kSecPasswordMinLengthKey
, cf24
,
152 kSecPasswordMaxLengthKey
, cf56
,
153 kSecPasswordAllowedCharactersKey
, CFSTR("diujk"),
154 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
155 kSecPasswordCantStartWithChars
, CFSTR("d"));
157 //test can't end with characters
158 test_password_generate(true, kSecPasswordTypeWifi
, 5,
159 kSecPasswordMinLengthKey
, cf24
,
160 kSecPasswordMaxLengthKey
, cf56
,
161 kSecPasswordAllowedCharactersKey
, CFSTR("diujk89"),
162 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
163 kSecPasswordCantEndWithChars
, CFSTR("d"));
165 //test 4 digit pin generation
166 for(int i
=0 ; i
< 100; i
++){
167 password
= SecPasswordGenerate(kSecPasswordTypePIN
, &error
, NULL
);
168 isnt(password
, NULL
);
172 CFReleaseNull(password
);
176 test_password_generate(true, kSecPasswordTypePIN
, 2,
177 kSecPasswordMinLengthKey
, cf4
,
178 kSecPasswordMaxLengthKey
, cf6
);
180 test_password_generate(true, kSecPasswordTypePIN
, 2,
181 kSecPasswordMinLengthKey
, cf5
,
182 kSecPasswordMaxLengthKey
, cf6
);
184 //test safari password
185 test_password_generate(true, kSecPasswordTypeSafari
, 4,
186 kSecPasswordMinLengthKey
, cf20
,
187 kSecPasswordMaxLengthKey
, cf32
,
188 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
189 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
191 //test flexible group size and number of groups in the password
192 //test safari password
193 test_password_generate(true, kSecPasswordTypeSafari
, 7,
194 kSecPasswordMinLengthKey
, cf12
,
195 kSecPasswordMaxLengthKey
, cf19
,
196 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
197 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
198 kSecPasswordGroupSize
, cf5
,
199 kSecPasswordNumberOfGroups
, cf23
,
200 kSecPasswordSeparator
, CFSTR("*"));
202 //test at least N characters
203 //test safari password
204 CFMutableDictionaryRef atLeast
= CFDictionaryCreateMutable(NULL
, 0, NULL
, NULL
);
205 CFDictionaryAddValue(atLeast
, kSecPasswordCharacters
, CFSTR("ab"));
206 CFDictionaryAddValue(atLeast
, kSecPasswordCharacterCount
, cf5
);
208 test_password_generate(true, kSecPasswordTypeSafari
, 5,
209 kSecPasswordMinLengthKey
, cf12
,
210 kSecPasswordMaxLengthKey
, cf19
,
211 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
212 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
213 kSecPasswordContainsAtLeastNSpecificCharacters
, atLeast
);
215 CFReleaseSafe(atLeast
);
217 //test no More than N characters
218 //test safari password
219 CFMutableDictionaryRef noMoreThan
= CFDictionaryCreateMutable(NULL
, 0, NULL
, NULL
);
220 CFDictionaryAddValue(noMoreThan
, kSecPasswordCharacters
, CFSTR("ab"));
221 CFDictionaryAddValue(noMoreThan
, kSecPasswordCharacterCount
, cf5
);
223 test_password_generate(true, kSecPasswordTypeSafari
, 5,
224 kSecPasswordMinLengthKey
, cf12
,
225 kSecPasswordMaxLengthKey
, cf19
,
226 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
227 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
228 kSecPasswordContainsNoMoreThanNSpecificCharacters
, noMoreThan
);
230 CFReleaseSafe(noMoreThan
);
232 //test identical character threshold
233 //test safari password
234 test_password_generate(true, kSecPasswordTypeSafari
, 5,
235 kSecPasswordMinLengthKey
, cf12
,
236 kSecPasswordMaxLengthKey
, cf19
,
237 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
238 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
239 kSecPasswordContainsNoMoreThanNConsecutiveIdenticalCharacters
, cf2
);
243 /////////////////now test all the error cases
244 //test with no required characters
245 CFMutableArrayRef emptyCharacterSets
= CFArrayCreateMutable(NULL
, 0, &kCFTypeArrayCallBacks
);
247 test_password_generate(false, kSecPasswordTypeWifi
, 4,
248 kSecPasswordMinLengthKey
, cf24
,
249 kSecPasswordMaxLengthKey
, cf32
,
250 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
251 kSecPasswordRequiredCharactersKey
, emptyCharacterSets
);
253 CFReleaseSafe(emptyCharacterSets
);
255 //test with no allowed characters
256 test_password_generate(false, kSecPasswordTypeWifi
, 4,
257 kSecPasswordMinLengthKey
, cf24
,
258 kSecPasswordMaxLengthKey
, cf32
,
259 kSecPasswordAllowedCharactersKey
, CFSTR(""),
260 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
262 //test with min > max
263 test_password_generate(false, kSecPasswordTypeWifi
, 4,
264 kSecPasswordMinLengthKey
, cf32
,
265 kSecPasswordMaxLengthKey
, cf24
,
266 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
267 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
269 //test by ommitting dictionary parameters
272 test_password_generate(false, kSecPasswordTypeWifi
, 3,
273 kSecPasswordMinLengthKey
, cf20
,
274 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
275 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
278 test_password_generate(false, kSecPasswordTypeWifi
, 3,
279 kSecPasswordMaxLengthKey
, cf32
,
280 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
281 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
283 //omit allowed characters
284 test_password_generate(false, kSecPasswordTypeWifi
, 3,
285 kSecPasswordMinLengthKey
, cf20
,
286 kSecPasswordMaxLengthKey
, cf32
,
287 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
289 //omit required characters
290 test_password_generate(false, kSecPasswordTypeWifi
, 3,
291 kSecPasswordMinLengthKey
, cf20
,
292 kSecPasswordMaxLengthKey
, cf32
,
293 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"));
296 //pass in wrong type for min
297 test_password_generate(false, kSecPasswordTypeWifi
, 4,
298 kSecPasswordMinLengthKey
, CFSTR("20"),
299 kSecPasswordMaxLengthKey
, cf32
,
300 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
301 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
303 //pass in wrong type for max
304 test_password_generate(false, kSecPasswordTypeWifi
, 4,
305 kSecPasswordMinLengthKey
, cf20
,
306 kSecPasswordMaxLengthKey
, CFSTR("32"),
307 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
308 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
310 //pass in wrong type for allowed
311 test_password_generate(false, kSecPasswordTypeWifi
, 4,
312 kSecPasswordMinLengthKey
, cf20
,
313 kSecPasswordMaxLengthKey
, cf32
,
314 kSecPasswordAllowedCharactersKey
, requiredCharacterSets
,
315 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
);
317 //pass in wrong type for required
318 test_password_generate(false, kSecPasswordTypeWifi
, 4,
319 kSecPasswordMinLengthKey
, cf20
,
320 kSecPasswordMaxLengthKey
, cf32
,
321 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
322 kSecPasswordRequiredCharactersKey
, CFSTR("abcdsefw2345"));
324 //pass in wrong type for no less than
325 test_password_generate(false, kSecPasswordTypeWifi
, 5,
326 kSecPasswordMinLengthKey
, cf20
,
327 kSecPasswordMaxLengthKey
, cf32
,
328 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
329 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
330 kSecPasswordContainsAtLeastNSpecificCharacters
, CFSTR("hehe"));
333 //pass in wrong type for no more than
334 test_password_generate(false, kSecPasswordTypeWifi
, 5,
335 kSecPasswordMinLengthKey
, cf20
,
336 kSecPasswordMaxLengthKey
, cf32
,
337 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
338 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
339 kSecPasswordContainsNoMoreThanNSpecificCharacters
, CFSTR("hehe"));
341 //pass in wrong disallowed characters
342 test_password_generate(false, kSecPasswordTypeWifi
, 5,
343 kSecPasswordMinLengthKey
, cf20
,
344 kSecPasswordMaxLengthKey
, cf32
,
345 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
346 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
347 kSecPasswordDisallowedCharacters
, requiredCharacterSets
);
349 //pass in wrong type for no more than's dictionary
350 CFMutableDictionaryRef wrongCount
= CFDictionaryCreateMutable(NULL
, 0, NULL
, NULL
);
351 CFDictionaryAddValue(wrongCount
, kSecPasswordCharacters
, CFSTR("lkj"));
352 CFDictionaryAddValue(wrongCount
, kSecPasswordCharacterCount
, CFSTR("sdf"));
354 test_password_generate(false, kSecPasswordTypeWifi
, 5,
355 kSecPasswordMinLengthKey
, cf20
,
356 kSecPasswordMaxLengthKey
, cf32
,
357 kSecPasswordAllowedCharactersKey
, CFSTR("abcdsefw2345"),
358 kSecPasswordRequiredCharactersKey
, requiredCharacterSets
,
359 kSecPasswordContainsNoMoreThanNSpecificCharacters
, wrongCount
);
361 CFReleaseSafe(wrongCount
);
364 //release CF objects:
377 CFReleaseSafe(requiredCharacterSets
);
380 // Weak Passwords tests
381 password
= CFSTR("Apple1?");
382 isnt(true, SecPasswordIsPasswordWeak(password
));
385 password
= CFSTR("Singhal190");
386 isnt(true, SecPasswordIsPasswordWeak(password
));
389 password
= CFSTR("1Hollow2");
390 isnt(true, SecPasswordIsPasswordWeak(password
));
393 password
= CFSTR("1Hollow/");
394 isnt(true, SecPasswordIsPasswordWeak(password
));
397 password
= CFSTR("baj/paj1");
398 isnt(true, SecPasswordIsPasswordWeak(password
));
401 password
= CFSTR("Zaxs1009?");
402 isnt(true, SecPasswordIsPasswordWeak(password
));
405 password
= CFSTR("6666");
406 isnt(false, SecPasswordIsPasswordWeak(password
));
409 password
= CFSTR("123456");
410 isnt(false, SecPasswordIsPasswordWeak(password
));
413 password
= CFSTR("654321");
414 isnt(false, SecPasswordIsPasswordWeak(password
));
417 password
= CFSTR("A");
418 isnt(false, SecPasswordIsPasswordWeak(password
));
421 password
= CFSTR("password");
422 isnt(true, SecPasswordIsPasswordWeak(password
));
425 password
= CFSTR("password1");
426 isnt(true, SecPasswordIsPasswordWeak(password
));
429 password
= CFSTR("P@ssw0rd");
430 isnt(true, SecPasswordIsPasswordWeak(password
));
433 password
= CFSTR("facebook!{}");
434 isnt(true, SecPasswordIsPasswordWeak(password
));
437 password
= CFSTR("12345678");
438 isnt(false, SecPasswordIsPasswordWeak(password
));
441 bool isSimple
= false;
443 password
= CFSTR("Apple1?");
444 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
447 password
= CFSTR("Singhal190");
448 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
451 password
= CFSTR("1Hollow2");
452 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
455 password
= CFSTR("1Hollow/");
456 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
459 password
= CFSTR("baj/paj1");
460 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
463 password
= CFSTR("Zaxs1009?");
464 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
467 password
= CFSTR("6666");
468 is(true, SecPasswordIsPasswordWeak2(isSimple
, password
));
471 password
= CFSTR("1235");
472 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
476 password
= CFSTR("6666");
477 is(true, SecPasswordIsPasswordWeak2(isSimple
, password
));
480 password
= CFSTR("1235");
481 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
485 password
= CFSTR("123456");
486 is(true, SecPasswordIsPasswordWeak2(isSimple
, password
));
489 password
= CFSTR("654321");
490 is(true, SecPasswordIsPasswordWeak2(isSimple
, password
));
493 password
= CFSTR("1577326");
494 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
497 password
= CFSTR("A");
498 is(true, SecPasswordIsPasswordWeak2(isSimple
, password
));
501 password
= CFSTR("password");
502 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
505 password
= CFSTR("password1");
506 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
509 password
= CFSTR("P@ssw0rd");
510 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
513 password
= CFSTR("facebook!{}");
514 is(false, SecPasswordIsPasswordWeak2(isSimple
, password
));
517 password
= CFSTR("12345678");
518 is(true, SecPasswordIsPasswordWeak2(isSimple
, password
));
521 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("666666")));
522 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("123456")));
523 is(false, SecPasswordIsPasswordWeak2(true, CFSTR("666166")));
524 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("525252")));
525 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("525252")));
526 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("52525")));
528 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("098765")));
529 is(true, SecPasswordIsPasswordWeak(CFSTR("0987")));
531 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("122222")));
532 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("222221")));
533 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("222114")));
534 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("221114")));
535 is(false, SecPasswordIsPasswordWeak2(false, CFSTR("221144")));
537 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("123456")));
538 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("666666")));
539 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("111111")));
540 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("520520")));
541 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("121212")));
542 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("000000")));
543 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("654321")));
545 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("123456")));
546 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("666666")));
547 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("111111")));
548 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("520520")));
549 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("121212")));
550 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("000000")));
551 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("654321")));
553 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("030379")));
554 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("101471")));
555 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("112233")));
556 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("123123")));
557 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("123321")));
559 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("123654")));
560 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("147258")));
561 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("159753")));
562 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("321654")));
563 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("520131")));
564 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("520520")));
565 is(true, SecPasswordIsPasswordWeak2(true, CFSTR("789456")));
567 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("123654")));
568 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("147258")));
569 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("159753")));
570 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("321654")));
571 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("520131")));
572 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("520520")));
573 is(true, SecPasswordIsPasswordWeak2(false, CFSTR("789456")));
576 int si_73_secpasswordgenerate(int argc
, char *const *argv
)