CryptoPassphrase  Check-in [8518df1e34]

Overview
Comment:Fix analyzer findings
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8518df1e34e7bb590b012a47520004e3f1713cc18841f37cdbe550088f860a7e
User & Date: js on 2017-10-15 15:04:58
Other Links: manifest | tags
Context
2017-10-15
15:13
iOS: Fix deleting a site check-in: cfca140d3c user: js tags: trunk
15:04
Fix analyzer findings check-in: 8518df1e34 user: js tags: trunk
12:27
iOS: Import ObjFW Xcode project into Xcode project check-in: c1b813d503 user: js tags: trunk
Changes

Modified iOS/AboutController.m from [253edc0533] to [d820800e9f].

42
43
44
45
46
47
48
49

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64


65
66
67
68
69
70
71
42
43
44
45
46
47
48

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73







-
+















+
+







    @"</style>"
    @"</head>"
    @"<body>"
    @"<div id='title'>"
    @" scrypt-pwgen {version}"
    @"</div>"
    @"<div id='copyright'>"
    @" Copyright © 2016, Jonathan Schleifer"
    @" Copyright © 2016 - 2017, Jonathan Schleifer"
    @"</div>"
    @"<p name='free_software'>"
    @" scrypt-pwgen is free software and the source code is available at "
    @" <a href='https://heap.zone/scrypt-pwgen/'>here</a>."
    @"</p>"
    @"<p name='objfw'>"
    @" It makes use of the <a href='https://heap.zone/objfw/'>ObjFW</a> "
    @"framework and also uses its scrypt implementation."
    @"</p>"
    @"</body>"
    @"</html>";

@implementation AboutController
- (void)viewDidLoad
{
	[super viewDidLoad];

	self.automaticallyAdjustsScrollViewInsets = NO;

	NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
	NSString *version = infoDictionary[@"CFBundleShortVersionString"];
	NSString *aboutHTML = [aboutHTMLTemplate
	    stringByReplacingOccurrencesOfString: @"{version}"
				      withString: version];

Modified iOS/AppDelegate.m from [3dced1c028] to [edb40869df].

19
20
21
22
23
24
25






26
19
20
21
22
23
24
25
26
27
28
29
30
31
32







+
+
+
+
+
+

 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import "AppDelegate.h"

@implementation AppDelegate
- (void)dealloc
{
	[_window release];

	[super dealloc];
}
@end

Modified iOS/MainViewController.m from [3ac209355d] to [9c43bd1d10].

26
27
28
29
30
31
32


33
34
35
36
37
38

39

40
41
42
43
44
45
46
47
48
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







+
+






+

+

-








#import "AddSiteController.h"
#import "ShowDetailsController.h"

@implementation MainViewController
- (void)viewDidLoad
{
	[super viewDidLoad];

	_siteStorage = [[SiteStorage alloc] init];
	[self reset];
}

- (void)dealloc
{
	[_sites release];
	[_siteStorage release];
	[_searchBar release];
	[_tableView release];
	[_sites release];

	[super dealloc];
}

- (void)reset
{
	void *pool = objc_autoreleasePoolPush();

Modified iOS/ShowDetailsController.m from [f7721ea223] to [3673b837ce].

54
55
56
57
58
59
60

61
62
63
64
65
66
67
68
69







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85


86
87
88
89
90
91
92
54
55
56
57
58
59
60
61
62
63
64
65
66
67



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99







+






-
-
-
+
+
+
+
+
+
+
















+
+







- (void)dealloc
{
	[_name release];
	[_nameField release];
	[_lengthField release];
	[_legacySwitch release];
	[_passphraseField release];
	[_mainViewController release];

	[super dealloc];
}

- (void)viewWillAppear: (BOOL)animated
{
	SiteStorage *siteStorage = self.mainViewController.siteStorage;
	NSIndexPath *indexPath =
	    self.mainViewController.tableView.indexPathForSelectedRow;
	SiteStorage *siteStorage;
	NSIndexPath *indexPath;

	[super viewWillAppear: animated];

	siteStorage = self.mainViewController.siteStorage;
	indexPath = self.mainViewController.tableView.indexPathForSelectedRow;

	[_name release];
	_name = [self.mainViewController.sites[indexPath.row] retain];
	_length = [siteStorage lengthForSite: _name];
	_legacy = [siteStorage isSiteLegacy: _name];

	self.nameField.text = [_name NSObject];
	self.lengthField.text = [NSString stringWithFormat: @"%zu", _length];
	self.legacySwitch.on = _legacy;

	[self.mainViewController.tableView deselectRowAtIndexPath: indexPath
							 animated: YES];
}

- (void)viewDidAppear: (BOOL)animated
{
	[super viewDidAppear: animated];

	[self.passphraseField becomeFirstResponder];
}

- (BOOL)textFieldShouldReturn: (UITextField *)textField
{
	[textField resignFirstResponder];
	return NO;