Tom Butcher bb690f3a1f Implement initial iOS application structure for DES Cracker
- Added AppDelegate and main entry point for the application.
- Created Info.plist for application configuration.
- Introduced UI components with PSCSlaveViewController for user interaction.
- Implemented networking and computation engines (CPU and Metal) for DES cracking.
- Established asset catalog for application resources including icons and colors.
- Updated results.json to reflect new elapsed time for brute force operations.
2026-09-19 17:02:33 +01:00

58 lines
2.0 KiB
Objective-C

#import <Foundation/Foundation.h>
#include <stdint.h>
NS_ASSUME_NONNULL_BEGIN
static const NSInteger kPSCProtocolVersion = 2;
static const NSInteger kPSCDefaultPort = 9876;
static const NSTimeInterval kPSCProgressInterval = 0.5;
static const NSTimeInterval kPSCPingInterval = 5.0;
NSString *PSCFormatDec64(uint64_t value);
NSString *PSCFormatHex64(uint64_t value);
NSString *PSCFormatCount(uint64_t value);
NSString *PSCFormatRate(double rate);
uint64_t PSCParseDec64(id value);
uint64_t PSCParseHex64(NSString *hex);
@interface PSCComputeDevice : NSObject
@property (nonatomic, copy) NSString *key;
@property (nonatomic, assign) NSInteger deviceId;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *type;
@property (nonatomic, strong, nullable) NSNumber *cores;
@property (nonatomic, strong, nullable) NSNumber *memory;
- (NSDictionary *)JSONObject;
@end
@interface PSCAssignBlock : NSObject
@property (nonatomic, copy) NSString *jobId;
@property (nonatomic, copy) NSString *deviceKey;
@property (nonatomic, assign) uint64_t start;
@property (nonatomic, assign) uint64_t count;
@property (nonatomic, assign) uint32_t keyLen;
@property (nonatomic, copy) NSString *charset;
@property (nonatomic, assign) uint32_t padByte;
@property (nonatomic, assign) uint64_t target;
@property (nonatomic, copy) NSArray<NSNumber *> *fills;
@property (nonatomic, strong, nullable) NSNumber *cpuWorkers;
+ (nullable instancetype)fromJSON:(NSDictionary *)json;
@end
@interface PSCWorkerSnapshot : NSObject
@property (nonatomic, copy) NSString *deviceKey;
@property (nonatomic, copy) NSString *deviceName;
@property (nonatomic, copy) NSString *deviceType;
@property (nonatomic, copy) NSString *current;
@property (nonatomic, assign) double pct;
@property (nonatomic, assign) NSInteger completedBlocks;
@property (nonatomic, assign) double rate;
@property (nonatomic, assign) BOOL busy;
@end
NSDictionary *_Nullable PSCDecodeMessage(NSString *raw);
NSString *_Nullable PSCEncodeMessage(NSDictionary *msg);
NS_ASSUME_NONNULL_END