ObjFW  Diff

Differences From Artifact [3f3d3563e3]:

To Artifact [edd9d8236f]:


24
25
26
27
28
29
30

31
32
33
34
35
36
37
#import "OFSHA1Hash.h"
#import "OFSHA224Hash.h"
#import "OFSHA256Hash.h"
#import "OFSHA384Hash.h"
#import "OFSHA512Hash.h"
#import "OFStdIOStream.h"
#import "OFLocalization.h"


#import "OFOpenItemFailedException.h"
#import "OFReadFailedException.h"

@interface OFHash: OFObject
@end








>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#import "OFSHA1Hash.h"
#import "OFSHA224Hash.h"
#import "OFSHA256Hash.h"
#import "OFSHA384Hash.h"
#import "OFSHA512Hash.h"
#import "OFStdIOStream.h"
#import "OFLocalization.h"
#import "OFSandbox.h"

#import "OFOpenItemFailedException.h"
#import "OFReadFailedException.h"

@interface OFHash: OFObject
@end

72
73
74
75
76
77
78












79
80
81
82
83
84
85
@implementation OFHash
- (void)applicationDidFinishLaunching
{
	OFArray OF_GENERIC(OFString*) *arguments = [OFApplication arguments];
	id <OFCryptoHash> hash;
	bool first = true;
	int exitStatus = 0;













	[OFLocalization addLanguageDirectory: @LANGUAGE_DIR];

	if ([arguments count] < 2)
		help();

	if ((hash = hashForName([arguments firstObject])) == nil)







>
>
>
>
>
>
>
>
>
>
>
>







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
@implementation OFHash
- (void)applicationDidFinishLaunching
{
	OFArray OF_GENERIC(OFString*) *arguments = [OFApplication arguments];
	id <OFCryptoHash> hash;
	bool first = true;
	int exitStatus = 0;

#ifdef OF_HAVE_SANDBOX
	OFSandbox *sandbox = [[OFSandbox alloc] init];
	@try {
		[sandbox setAllowsStdIO: true];
		[sandbox setAllowsReadingFiles: true];

		[OFApplication activateSandbox: sandbox];
	} @finally {
		[sandbox release];
	}
#endif

	[OFLocalization addLanguageDirectory: @LANGUAGE_DIR];

	if ([arguments count] < 2)
		help();

	if ((hash = hashForName([arguments firstObject])) == nil)