forked from pixmeo/osirix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPSGenerator.h
59 lines (47 loc) · 1.42 KB
/
PSGenerator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* PSGenerator */
#import <Cocoa/Cocoa.h>
@interface PSGenerator : NSObject
{
// Parameters
NSMutableString *formatString;
NSMutableDictionary *sourceStringsDict;
unsigned minLength;
unsigned maxLength;
unsigned alternativeNum;
BOOL shouldMix;
// Temporary Variables
NSMutableArray *tempArray;
NSMutableString *tempString;
NSString *sourceString;
NSString *tempKey;
NSMutableString *tempFormatString;
unsigned thisLength;
unsigned randCharPos;
unsigned tempAltNum;
int i, j, x, y;
}
- (id) initWithFormatString: (NSMutableString *) str
sourceStrings: (NSMutableDictionary *) stringDict
minLength: (unsigned) min
maxLength: (unsigned) max;
- (id) initWithSourceString: (NSString *) str
minLength: (unsigned) min
maxLength: (unsigned) max;
- (void) dealloc;
- (void) setFormatString: (NSMutableString *) str;
- (void) setStandardFormatString;
- (void) setSourceStrings: (NSMutableDictionary *) stringDict;
- (void) setMinLength: (unsigned) min;
- (void) setMaxLength: (unsigned) max;
- (void) setAlternativeNum: (unsigned) num;
- (NSString *) mainCharacterString;
- (NSString *) altCharacterString;
- (unsigned) minLength;
- (unsigned) maxLength;
- (unsigned) alternativeNum;
- (void) addStringToDict: (NSString *) str
withKey: (NSString *) key;
- (NSArray *) generate: (unsigned) numPasswords;
- (void) prepareFormatString;
@end
int randomNumberBetween( int low, int high );