├── Default-568h@2x.png ├── icon_explosive.png ├── icon_explosive@2x.png ├── .gitignore ├── SQLCipherSpeed_Prefix.pch ├── .gitmodules ├── Makefile ├── main.m ├── Classes ├── IteratedTest.h ├── IteratedSqlTest.h ├── TestResultCell.m ├── SQLCipherSpeedAppDelegate.h ├── IteratedTest.m ├── ResultViewController.h ├── TestResultCell.h ├── SQLCipherSpeedAppDelegate.m ├── SqlTest.h ├── IteratedSqlTest.m ├── ProgressViewController.h ├── TestDefinitions.h ├── ResultViewController.m ├── LogicTest.m ├── SqlTest.m ├── TestDefinitions.m └── ProgressViewController.m ├── Tests-Info.plist ├── README.markdown ├── Info.plist ├── LICENSE.txt ├── MainWindow.xib ├── ProgressViewController.xib ├── ResultViewController.xib ├── TestResultCell.xib └── SQLCipherSpeed.xcodeproj └── project.pbxproj /Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sqlcipher/SQLCipherSpeed/HEAD/Default-568h@2x.png -------------------------------------------------------------------------------- /icon_explosive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sqlcipher/SQLCipherSpeed/HEAD/icon_explosive.png -------------------------------------------------------------------------------- /icon_explosive@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sqlcipher/SQLCipherSpeed/HEAD/icon_explosive@2x.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.pbxuser 3 | xcuserdata 4 | xcuserdata/* 5 | *.xcworkspace/* 6 | *.xcworkspace 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /SQLCipherSpeed_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SQLCipherSpeed' target in the 'SQLCipherSpeed' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #import "NSDate+Helper.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "sqlcipher"] 2 | path = sqlcipher 3 | url = https://github.com/sqlcipher/sqlcipher.git 4 | [submodule "openssl-xcode"] 5 | path = openssl-xcode 6 | url = https://github.com/sqlcipher/openssl-xcode.git 7 | [submodule "nsdate-helper"] 8 | path = nsdate-helper 9 | url = git://github.com/billymeltdown/nsdate-helper.git 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SQLCIPHER_DIR := ${CURDIR}/sqlcipher 2 | .DEFAULT_GOAL := amalgamation 3 | 4 | amalgamation: 5 | cd ${SQLCIPHER_DIR} && \ 6 | ${SQLCIPHER_DIR}/configure --with-crypto-lib=commoncrypto --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2" LDFLAGS="-framework Security" && \ 7 | make sqlite3.c 8 | 9 | init: 10 | git submodule update --init 11 | 12 | clean: 13 | -cd ${SQLCIPHER_DIR} && make clean -------------------------------------------------------------------------------- /main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright Zetetic LLC 2009. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /Classes/IteratedTest.h: -------------------------------------------------------------------------------- 1 | // 2 | // IterationTest.h 3 | // SQLCipherSpeed 4 | // 5 | // Created by Nick Parker on 6/6/12. 6 | // Copyright (c) 2012 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SqlTest.h" 11 | 12 | @interface IteratedTest : SqlTest { 13 | NSInteger iterations; 14 | } 15 | 16 | @property (assign, nonatomic) NSInteger iterations; 17 | 18 | -(void) bind:(NSInteger)i; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Classes/IteratedSqlTest.h: -------------------------------------------------------------------------------- 1 | // 2 | // InteratedSqlTest.h 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/31/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SqlTest.h" 11 | 12 | @interface IteratedSqlTest : SqlTest { 13 | sqlite3_stmt *stmt; 14 | NSInteger iterations; 15 | BOOL useTransaction; 16 | } 17 | 18 | @property (assign, nonatomic) NSInteger iterations; 19 | @property (assign, nonatomic) BOOL useTransaction; 20 | 21 | -(void) bind:(NSInteger)i; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Classes/TestResultCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestResultCell.m 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import "TestResultCell.h" 10 | 11 | @implementation TestResultCell 12 | @synthesize nameLabel, sqlLabel, normalTimeLabel, encryptedTimeLabel, slowDownLabel; 13 | 14 | -(void) dealloc { 15 | [nameLabel release]; 16 | [sqlLabel release]; 17 | [normalTimeLabel release]; 18 | [encryptedTimeLabel release]; 19 | [slowDownLabel release]; 20 | [super dealloc]; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Classes/SQLCipherSpeedAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // SQLCipherSpeedAppDelegate.h 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright Zetetic LLC 2009. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SQLCipherSpeedAppDelegate : NSObject { 12 | 13 | UIWindow *window; 14 | UINavigationController *navigationController; 15 | } 16 | 17 | @property (nonatomic, retain) IBOutlet UIWindow *window; 18 | @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /Classes/IteratedTest.m: -------------------------------------------------------------------------------- 1 | // 2 | // IterationTest.m 3 | // SQLCipherSpeed 4 | // 5 | // Created by Nick Parker on 6/6/12. 6 | // Copyright (c) 2012 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import "IteratedTest.h" 10 | 11 | @implementation IteratedTest 12 | @synthesize iterations; 13 | 14 | -(id) init { 15 | [super init]; 16 | return self; 17 | } 18 | 19 | -(void) bind:(NSInteger) i { 20 | NSLog(@"placeholder to implement in subclass"); 21 | } 22 | 23 | -(void) runTest:(sqlite3 *)db { 24 | 25 | for(int i = 0; i < iterations; i++) { 26 | [self bind:i]; 27 | } 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Classes/ResultViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ResultViewController.h 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright Zetetic LLC 2009. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TestResultCell.h" 11 | 12 | @interface ResultViewController : UITableViewController { 13 | NSArray *results; 14 | IBOutlet TestResultCell *resultCell; 15 | NSDate *testDate; 16 | BOOL displayingAverages; 17 | } 18 | 19 | @property(nonatomic,retain) NSArray *results; 20 | @property(nonatomic,retain) IBOutlet TestResultCell *resultCell; 21 | @property(nonatomic,retain) NSDate *testDate; 22 | @property(nonatomic) BOOL displayingAverages; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /Classes/TestResultCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestResultCell.h 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface TestResultCell : UITableViewCell { 13 | IBOutlet UILabel *nameLabel; 14 | IBOutlet UILabel *sqlLabel; 15 | IBOutlet UILabel *slowDownLabel; 16 | IBOutlet UILabel *normalTimeLabel; 17 | IBOutlet UILabel *encryptedTimeLabel; 18 | } 19 | 20 | @property (nonatomic,retain) IBOutlet UILabel *nameLabel; 21 | @property (nonatomic,retain) IBOutlet UILabel *sqlLabel; 22 | @property (nonatomic,retain) IBOutlet UILabel *slowDownLabel; 23 | @property (nonatomic,retain) IBOutlet UILabel *normalTimeLabel; 24 | @property (nonatomic,retain) IBOutlet UILabel *encryptedTimeLabel; 25 | @end 26 | -------------------------------------------------------------------------------- /Classes/SQLCipherSpeedAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // SQLCipherSpeedAppDelegate.m 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright Zetetic LLC 2009. All rights reserved. 7 | // 8 | 9 | #import "SQLCipherSpeedAppDelegate.h" 10 | 11 | @implementation SQLCipherSpeedAppDelegate 12 | 13 | @synthesize window; 14 | @synthesize navigationController; 15 | 16 | 17 | - (void)applicationDidFinishLaunching:(UIApplication *)application { 18 | 19 | // Configure and show the window 20 | [window addSubview:[navigationController view]]; 21 | [window makeKeyAndVisible]; 22 | } 23 | 24 | 25 | - (void)applicationWillTerminate:(UIApplication *)application { 26 | // Save data if appropriate 27 | } 28 | 29 | 30 | - (void)dealloc { 31 | [navigationController release]; 32 | [window release]; 33 | [super dealloc]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | # SQLCipherSpeed 2 | 3 | A project for testing the speed of [SQLCipher](http://github.com/sjlombardo/sqlcipher) on an iOS device, and measuring the impact of the encryption used compared to [SQLite](http://www.sqlite.org). 4 | 5 | ## iOS 7 & Xcode 5 6 | 7 | SQLCipherSpeed sets iOS 7 as the minimum deployment target. It is intended for us with Xcode 5, compatibility with earlier versions will not be maintained. 8 | 9 | ## Prerequisites for Building 10 | 11 | Before you build this project, you'll need to load up the submodules used, e.g.: 12 | 13 | $ git clone git://github.com/billymeltdown/SQLCipherSpeed.git 14 | $ cd SQLCipherSpeed 15 | $ make init 16 | 17 | 18 | ## Need help? Want to help? 19 | 20 | Pull requests are encouraged, feature requests are up to you! Feel free to say, "hello", on [the SQLCipher discussion list](http://groups.google.com/group/sqlcipher). 21 | 22 | ### Legal 23 | 24 | This project is owned and maintained by [Zetetic](http://zetetic.net). It is provided under an MIT-style open-source license (see LICENSE.txt). 25 | -------------------------------------------------------------------------------- /Classes/SqlTest.h: -------------------------------------------------------------------------------- 1 | // 2 | // SpeedTest.h 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "sqlite3.h" 11 | 12 | @interface SqlTest : NSObject { 13 | sqlite3 *normalDb; 14 | sqlite3 *encryptedDb; 15 | NSString *name; 16 | NSString *sql; 17 | uint64_t normalNs; 18 | uint64_t encryptedNs; 19 | NSString *nick; 20 | } 21 | 22 | @property (nonatomic,retain) NSString *name; 23 | @property (nonatomic,retain) NSString *sql; 24 | @property (nonatomic) uint64_t normalNs; 25 | @property (nonatomic) uint64_t encryptedNs; 26 | @property (nonatomic,retain) NSString *nick; 27 | @property (nonatomic) NSInteger sqliteResult; 28 | @property (nonatomic) NSInteger sqlcipherResult; 29 | @property (nonatomic,readonly) double sqlcipherImpact; 30 | 31 | -(id) initWithDb:(sqlite3 *)normal encrypted:(sqlite3 *)encrypted; 32 | -(void) setup; 33 | -(void) runTests; 34 | -(void) runTest:(sqlite3 *)db; 35 | - (double)sqlcipherImpact; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Classes/IteratedSqlTest.m: -------------------------------------------------------------------------------- 1 | // 2 | // InteratedSqlTest.m 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/31/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import "IteratedSqlTest.h" 10 | 11 | 12 | @implementation IteratedSqlTest 13 | @synthesize iterations, useTransaction; 14 | 15 | -(id) init { 16 | [super init]; 17 | useTransaction = NO; 18 | return self; 19 | } 20 | 21 | -(void) runTest:(sqlite3 *)db { 22 | if(useTransaction) { 23 | sqlite3_exec(db, "BEGIN;", NULL, NULL, NULL); 24 | } 25 | 26 | if(sqlite3_prepare_v2(db, [sql UTF8String], -1, &stmt, NULL) == SQLITE_OK) { 27 | for(int i = 0; i < iterations; i++) { 28 | [self bind:i]; 29 | while(sqlite3_step(stmt) != SQLITE_DONE) { 30 | //NSLog(@"step"); 31 | } 32 | sqlite3_reset(stmt); 33 | sqlite3_clear_bindings(stmt); 34 | } 35 | } else { 36 | NSAssert1(0, @"Error preparing statement '%s'", sqlite3_errmsg(db)); 37 | } 38 | 39 | sqlite3_finalize(stmt); 40 | 41 | if(useTransaction) { 42 | sqlite3_exec(db, "COMMIT;", NULL, NULL, NULL); 43 | } 44 | } 45 | 46 | -(void) bind:(NSInteger) i { 47 | NSLog(@"placeholder to implement in subclass"); 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | SQLCipher 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIconFiles 14 | 15 | icon_explosive.png 16 | icon_explosive@2x.png 17 | 18 | CFBundleIdentifier 19 | net.zetetic.${PRODUCT_NAME:identifier} 20 | CFBundleInfoDictionaryVersion 21 | 6.0 22 | CFBundleName 23 | ${PRODUCT_NAME} 24 | CFBundlePackageType 25 | APPL 26 | CFBundleSignature 27 | ???? 28 | CFBundleVersion 29 | 1.0 30 | LSRequiresIPhoneOS 31 | 32 | NSMainNibFile 33 | MainWindow 34 | UISupportedInterfaceOrientations 35 | 36 | UIInterfaceOrientationPortrait 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009, 2010, 2011, ZETETIC LLC 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the ZETETIC LLC nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY ZETETIC LLC ''AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL ZETETIC LLC BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Classes/ProgressViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ProgressViewController.h 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface ProgressViewController : UIViewController { 13 | IBOutlet UIButton *testButton; 14 | IBOutlet UIProgressView *progressView; 15 | IBOutlet UILabel *testNumberLabel; 16 | IBOutlet UITableView *tableView; 17 | IBOutlet UIView *headerView; 18 | IBOutlet UITextField *pageSizeField; 19 | NSArray *tests; 20 | NSMutableArray *resultSets; 21 | NSDictionary *averageResultSet; 22 | BOOL calculatingAverages; 23 | UITextField *_kdfIterationsField; 24 | } 25 | 26 | @property(nonatomic,retain) IBOutlet UIButton *testButton; 27 | @property(nonatomic,retain) IBOutlet UIProgressView *progressView; 28 | @property(nonatomic,retain) IBOutlet UILabel *testNumberLabel; 29 | @property(nonatomic,retain) IBOutlet UITableView *tableView; 30 | @property(nonatomic,retain) IBOutlet UIView *headerView; 31 | @property(nonatomic,retain) IBOutlet UITextField *pageSizeField; 32 | @property(nonatomic,retain) NSArray *tests; 33 | @property(nonatomic,retain) NSMutableArray *resultSets; 34 | @property(nonatomic,retain) NSDictionary *averageResultSet; 35 | @property(nonatomic) BOOL calculatingAverages; 36 | @property(nonatomic,retain) IBOutlet UITextField *kdfIterationsField; 37 | 38 | - (IBAction)reset:(id)sender; 39 | - (IBAction)runTest:(id)sender; 40 | 41 | + (NSString *)pathToDatabase:(NSString *)fileName; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Classes/TestDefinitions.h: -------------------------------------------------------------------------------- 1 | // 2 | // InsertNoTransactionTest.h 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SqlTest.h" 11 | #import "IteratedSqlTest.h" 12 | #import "IteratedTest.h" 13 | 14 | @interface PragmaKeyTest : SqlTest { 15 | NSInteger pageSize; 16 | NSInteger kdfIterations; 17 | } 18 | @property (nonatomic) NSInteger pageSize; 19 | @property (nonatomic) NSInteger kdfIterations; 20 | @end 21 | 22 | @interface CreateTableTest : SqlTest { } 23 | @end 24 | 25 | @interface InsertNoTransactionTest : IteratedSqlTest{ } 26 | @end 27 | 28 | @interface InsertWithTransactionTest : IteratedSqlTest { } 29 | @end 30 | 31 | @interface SelectWithoutIndexTest : IteratedSqlTest { } 32 | @end 33 | 34 | @interface SelectOnStringCompareTest : IteratedSqlTest { } 35 | @end 36 | 37 | @interface CreateIndexTest : SqlTest { } 38 | @end 39 | 40 | @interface SelectWithIndexTest : IteratedSqlTest { } 41 | @end 42 | 43 | @interface UpdateWithoutIndexTest : IteratedSqlTest { } 44 | @end 45 | 46 | @interface UpdateWithIndexTest : IteratedSqlTest { } 47 | @end 48 | 49 | @interface InsertFromSelectTest : SqlTest { } 50 | @end 51 | 52 | @interface DeleteWithoutIndexTest : SqlTest { } 53 | @end 54 | 55 | @interface DeleteWithIndexTest : SqlTest { } 56 | @end 57 | 58 | @interface BigInsertAfterDeleteTest : SqlTest { } 59 | @end 60 | 61 | @interface ManyInsertsAfterDeleteTest : IteratedSqlTest { } 62 | @end 63 | 64 | @interface DropTableTest : SqlTest { } 65 | @end 66 | 67 | @interface PBKDF2Test : IteratedTest {} 68 | @end 69 | -------------------------------------------------------------------------------- /Classes/ResultViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ResultViewController.m 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright Zetetic LLC 2009. All rights reserved. 7 | // 8 | 9 | #import "ResultViewController.h" 10 | #import "SqlTest.h" 11 | 12 | @implementation ResultViewController 13 | @synthesize results, resultCell, testDate, displayingAverages; 14 | 15 | - (void)awakeFromNib 16 | { 17 | displayingAverages = NO; 18 | } 19 | 20 | - (void)dealloc { 21 | [testDate release]; 22 | [results release]; 23 | [resultCell release]; 24 | [super dealloc]; 25 | } 26 | 27 | - (void)didReceiveMemoryWarning { 28 | [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview 29 | // Release anything that's not essential, such as cached data 30 | } 31 | 32 | - (void)viewWillAppear:(BOOL)animated 33 | { 34 | [super viewWillAppear:YES]; 35 | if (displayingAverages) 36 | self.navigationItem.title = @"Averages"; 37 | else 38 | self.navigationItem.title = [NSDate stringForDisplayFromDate:testDate]; 39 | } 40 | 41 | #pragma mark Table view methods 42 | 43 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 44 | return 1; 45 | } 46 | 47 | 48 | // Customize the number of rows in the table view. 49 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 50 | return [results count]; 51 | } 52 | 53 | 54 | // Customize the appearance of table view cells. 55 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 56 | 57 | static NSString *CellIdentifier = @"TestResultCell"; 58 | 59 | resultCell = (TestResultCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 60 | if (resultCell == nil) { 61 | [[NSBundle mainBundle] loadNibNamed:@"TestResultCell" owner:self options:nil]; 62 | } 63 | 64 | SqlTest *result = (SqlTest *) [results objectAtIndex:indexPath.row]; 65 | resultCell.nameLabel.text = result.name; 66 | resultCell.sqlLabel.text = result.sql; 67 | 68 | resultCell.normalTimeLabel.text = [NSString stringWithFormat:@"%ld ms", (long)result.sqliteResult]; 69 | resultCell.encryptedTimeLabel.text = [NSString stringWithFormat:@"%ld ms", (long)result.sqlcipherResult]; 70 | resultCell.slowDownLabel.text = [NSString stringWithFormat:@"%.1f%%", result.sqlcipherImpact]; 71 | 72 | return resultCell; 73 | } 74 | 75 | 76 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 77 | [tableView deselectRowAtIndexPath:indexPath animated:NO]; 78 | } 79 | 80 | @end 81 | 82 | -------------------------------------------------------------------------------- /MainWindow.xib: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /Classes/LogicTest.m: -------------------------------------------------------------------------------- 1 | // 2 | // LogicTest.h 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 2/18/11. 6 | // Copyright 2011 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #include 12 | 13 | @interface LogicTest : SenTestCase { 14 | 15 | } 16 | - (void)testWorking; 17 | - (void)testSQLCipher; 18 | 19 | @end 20 | @implementation LogicTest 21 | 22 | 23 | - (void)testWorking 24 | { 25 | NSString *test = @"test"; 26 | NSString *test2 = nil; 27 | 28 | STAssertEqualObjects(test, test, @"objects should be equal"); 29 | STAssertNil(test2, @"object should be nil"); 30 | } 31 | 32 | - (void)testSQLCipher 33 | { 34 | sqlite3 *db; 35 | int rc, rows; 36 | sqlite3_stmt *stmt; 37 | const char* key = "test123"; 38 | const char* file = "sqlciphertest.db"; 39 | 40 | NSFileManager *fm = [NSFileManager defaultManager] ; 41 | 42 | [fm removeItemAtPath:[NSString stringWithUTF8String:file] error:NULL]; 43 | 44 | rc = sqlite3_open(file, &db); 45 | STAssertTrue(rc == SQLITE_OK, @"sqlite3_open reported error"); 46 | STAssertTrue(db != NULL, @"sqlite3_open reported OK, but db is null"); 47 | 48 | rc = sqlite3_key(db, key, strlen(key)); 49 | STAssertTrue(rc == SQLITE_OK , @"error setting key"); 50 | 51 | rc = sqlite3_prepare_v2(db, "SELECT count(*) FROM sqlite_master;", -1, &stmt, NULL); 52 | STAssertTrue(rc == SQLITE_OK , @"error preparing query"); 53 | 54 | rc = sqlite3_step(stmt); 55 | STAssertTrue(rc == SQLITE_ROW , @"error querying"); 56 | 57 | rows = sqlite3_column_int(stmt, 0); 58 | STAssertTrue(rows == 0 , @"bad count"); 59 | 60 | sqlite3_finalize(stmt); 61 | 62 | rc = sqlite3_exec(db, "CREATE TABLE t1(a,b);", NULL, NULL, NULL); 63 | STAssertTrue(rc == SQLITE_OK , @"error creating table"); 64 | 65 | rc = sqlite3_exec(db, "INSERT INTO t1(a,b) VALUES (1,2);", NULL, NULL, NULL); 66 | STAssertTrue(rc == SQLITE_OK , @"error inserting data"); 67 | 68 | sqlite3_close(db); 69 | 70 | STAssertTrue([fm fileExistsAtPath:[NSString stringWithUTF8String:file]], @"database file missing"); 71 | 72 | rc = sqlite3_open(file, &db); 73 | 74 | STAssertTrue(rc == SQLITE_OK, @"sqlite3_open reported error while reopening existing db"); 75 | STAssertTrue(db != NULL, @"sqlite3_open reported OK, but db is null"); 76 | 77 | rc = sqlite3_key(db, key, strlen(key)); 78 | STAssertTrue(rc == SQLITE_OK , @"error setting key"); 79 | 80 | rc = sqlite3_prepare_v2(db, "SELECT count(*) FROM sqlite_master;", -1, &stmt, NULL); 81 | STAssertTrue(rc == SQLITE_OK , @"error preparing query"); 82 | 83 | rc = sqlite3_step(stmt); 84 | STAssertTrue(rc == SQLITE_ROW , @"error querying"); 85 | 86 | rows = sqlite3_column_int(stmt, 0); 87 | STAssertTrue(rows == 1 , @"bad row count from sqlite_master"); 88 | 89 | sqlite3_finalize(stmt); 90 | 91 | rc = sqlite3_prepare_v2(db, "SELECT count(*) FROM t1;", -1, &stmt, NULL); 92 | STAssertTrue(rc == SQLITE_OK , @"error preparing query"); 93 | 94 | rc = sqlite3_step(stmt); 95 | STAssertTrue(rc == SQLITE_ROW , @"error querying"); 96 | 97 | rows = sqlite3_column_int(stmt, 0); 98 | STAssertTrue(rows == 1 , @"bad row count from sqlite_master"); 99 | 100 | sqlite3_finalize(stmt); 101 | sqlite3_close(db); 102 | 103 | 104 | } 105 | 106 | @end 107 | -------------------------------------------------------------------------------- /Classes/SqlTest.m: -------------------------------------------------------------------------------- 1 | // 2 | // SpeedTest.m 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import "SqlTest.h" 10 | #include 11 | #include 12 | 13 | @implementation SqlTest 14 | 15 | @synthesize name, sql, normalNs, encryptedNs, nick; 16 | 17 | @dynamic sqlcipherImpact, sqlcipherResult, sqliteResult; 18 | 19 | -(id) initWithDb:(sqlite3 *)normal encrypted:(sqlite3 *)encrypted { 20 | if ((self = [super init])) 21 | { 22 | normalDb = normal; 23 | encryptedDb = encrypted; 24 | } 25 | return self; 26 | } 27 | 28 | -(void) dealloc { 29 | [nick release]; 30 | [name release]; 31 | [sql release]; 32 | [super dealloc]; 33 | } 34 | 35 | - (id)copyWithZone:(NSZone *)zone 36 | { 37 | SqlTest *newObject = [[[self class] alloc] init]; 38 | newObject.name = self.name; 39 | newObject.sql = self.sql; 40 | newObject.normalNs = self.normalNs; 41 | newObject.encryptedNs = self.encryptedNs; 42 | newObject.nick = self.nick; 43 | return newObject; 44 | } 45 | 46 | - (void)encodeWithCoder: (NSCoder *)coder 47 | { 48 | [coder encodeObject:[self name] forKey:@"name"]; 49 | [coder encodeObject:[self sql] forKey:@"sql"]; 50 | [coder encodeObject:[self nick] forKey:@"nick"]; 51 | [coder encodeInt64:[self normalNs] forKey:@"normalNs"]; 52 | [coder encodeInt64:[self encryptedNs] forKey:@"encryptedNs"]; 53 | } 54 | 55 | - (id)initWithCoder:(NSCoder *)decoder 56 | { 57 | if ((self = [super init])) // extra parens silences warning about evaling and assignment 58 | { 59 | name = [[decoder decodeObjectForKey:@"name"] retain]; 60 | sql = [[decoder decodeObjectForKey:@"sql"] retain]; 61 | nick = [[decoder decodeObjectForKey:@"nick"] retain]; 62 | normalNs = [decoder decodeInt64ForKey:@"normalNs"]; 63 | encryptedNs = [decoder decodeInt64ForKey:@"encryptedNs"]; 64 | } 65 | return self; 66 | } 67 | 68 | -(void) setup { 69 | NSLog(@"placeholder to implement in subclass"); 70 | } 71 | 72 | - (NSString *)nick 73 | { 74 | if (nick) return nick; 75 | return [[self class] description]; 76 | } 77 | 78 | - (NSString *)description 79 | { 80 | return [NSString stringWithFormat:@"%@ impact: %.1lf%% sqlite: %ld ms sqlcipher: %ld ms", 81 | [self nick], [self sqlcipherImpact], [self sqliteResult], [self sqlcipherResult]]; 82 | } 83 | 84 | -(void) runTests { 85 | uint64_t start; 86 | static mach_timebase_info_data_t stInfo; 87 | mach_timebase_info(&stInfo); // initialize time base for timer calculations 88 | 89 | [self setup]; 90 | 91 | start = mach_absolute_time(); 92 | [self runTest:normalDb]; 93 | normalNs = (mach_absolute_time() - start) * stInfo.numer / stInfo.denom; 94 | 95 | start = mach_absolute_time(); 96 | [self runTest:encryptedDb]; 97 | encryptedNs = (mach_absolute_time() - start) * stInfo.numer / stInfo.denom; 98 | } 99 | 100 | -(void) runTest:(sqlite3 *)db { 101 | NSLog(@"placeholder to implement in subclass"); 102 | } 103 | 104 | - (NSInteger)sqliteResult 105 | { 106 | return self.normalNs / 1000000; 107 | } 108 | 109 | - (void)setSqliteResult:(NSInteger)milliseconds 110 | { 111 | // convert to nanoseconds 112 | [self willChangeValueForKey:@"normalNs"]; 113 | normalNs = milliseconds * 1000000; 114 | [self didChangeValueForKey:@"normalNs"]; 115 | } 116 | 117 | - (NSInteger)sqlcipherResult 118 | { 119 | // convert to nanoseconds 120 | return self.encryptedNs / 1000000; 121 | } 122 | 123 | - (void)setSqlcipherResult:(NSInteger)milliseconds 124 | { 125 | [self willChangeValueForKey:@"encryptedNs"]; 126 | encryptedNs = milliseconds * 1000000; 127 | [self didChangeValueForKey:@"encryptedNs"]; 128 | } 129 | 130 | - (double)sqlcipherImpact 131 | { 132 | NSInteger normalMs = self.sqliteResult; 133 | NSInteger encryptedMs = self.sqlcipherResult; 134 | return ((double) (encryptedMs - normalMs) / (double) normalMs) * 100.0; 135 | } 136 | 137 | @end 138 | -------------------------------------------------------------------------------- /ProgressViewController.xib: -------------------------------------------------------------------------------- 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 | 61 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /Classes/TestDefinitions.m: -------------------------------------------------------------------------------- 1 | // 2 | // InsertNoTransactionTest.m 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import "TestDefinitions.h" 10 | #import 11 | 12 | @implementation PragmaKeyTest 13 | 14 | #define KEY "PRAGMA key = 'xyz';" 15 | //#define KEY "PRAGMA key = \"x'98483C6EB40B6C31A448C22A66DED3B5E5E8D5119CAC8327B655C8B5C4836481'\";" 16 | 17 | @synthesize pageSize; 18 | @synthesize kdfIterations; 19 | 20 | - (id)init 21 | { 22 | if ((self = [super init])) 23 | { 24 | pageSize = 0; 25 | kdfIterations = 0; 26 | } 27 | return self; 28 | } 29 | 30 | -(void) setup { 31 | self.name = @"Set Encryption Key"; 32 | self.sql = @"PRAGMA key = 'xyz'; SELECT count(*) FROM sqlite_master;"; 33 | } 34 | 35 | -(void) runTest:(sqlite3 *)db { 36 | if(db == encryptedDb) { 37 | sqlite3_exec(encryptedDb, KEY, NULL, NULL, NULL); 38 | if (kdfIterations > 0) { 39 | NSString *kdfSQL = [NSString stringWithFormat:@"PRAGMA kdf_iter = %d;", (int)kdfIterations]; 40 | sqlite3_exec(encryptedDb, [kdfSQL UTF8String], NULL, NULL, NULL); 41 | } 42 | // if the pageSize property was set, use it instead of the sqlite default 43 | if (pageSize > 0) 44 | { 45 | NSString *pageSizeSQL = [NSString stringWithFormat:@"PRAGMA cipher_page_size = %ld;", (long)pageSize]; 46 | NSLog(@"setting non-standard pageSize with: %@", pageSizeSQL); 47 | sqlite3_exec(encryptedDb, [pageSizeSQL UTF8String], NULL, NULL, NULL); 48 | } 49 | } 50 | sqlite3_exec(db, "SELECT count(*) FROM sqlite_master;", NULL, NULL, NULL); 51 | } 52 | 53 | @end 54 | 55 | @implementation CreateTableTest 56 | 57 | -(void) setup { 58 | self.name = @"Create 2 tables"; 59 | self.sql = @"CREATE TABLE t1...; CREATE TABLE t2..."; 60 | } 61 | 62 | -(void) runTest:(sqlite3 *)db { 63 | sqlite3_exec(db, "CREATE TABLE t1(a INTEGER, b INTEGER, c VARCHAR(100));", NULL, NULL, NULL); 64 | sqlite3_exec(db, "CREATE TABLE t2(a INTEGER, b INTEGER, c VARCHAR(100));", NULL, NULL, NULL); 65 | } 66 | 67 | @end 68 | 69 | @implementation InsertNoTransactionTest 70 | 71 | -(void) setup { 72 | self.name = @"500 inserts without transaction"; 73 | self.sql = @"INSERT INTO t1 VALUES (?,?,?);"; 74 | self.iterations = 500; 75 | } 76 | 77 | -(void) bind:(NSInteger)i { 78 | int random = rand() * 100000; 79 | sqlite3_bind_int(stmt, 1, (int)i); 80 | sqlite3_bind_int(stmt, 2, random); 81 | sqlite3_bind_text(stmt, 3, [[NSString stringWithFormat:@"%d", random] UTF8String], -1, SQLITE_TRANSIENT); 82 | } 83 | 84 | @end 85 | 86 | @implementation InsertWithTransactionTest 87 | 88 | -(void) setup { 89 | self.name = @"15000 inserts with a transaction"; 90 | self.sql = @"INSERT INTO t2 VALUES (?,?,?);"; 91 | self.iterations = 15000; 92 | self.useTransaction = YES; 93 | } 94 | 95 | -(void) bind:(NSInteger)i { 96 | int random = rand() * 100000; 97 | sqlite3_bind_int(stmt, 1, (int)i); 98 | sqlite3_bind_int(stmt, 2, random); 99 | sqlite3_bind_text(stmt, 3, [[NSString stringWithFormat:@"%d", random] UTF8String], -1, SQLITE_TRANSIENT); 100 | } 101 | 102 | @end 103 | 104 | @implementation SelectWithoutIndexTest 105 | 106 | -(void) setup { 107 | self.name = @"50 SELECTs without an index"; 108 | self.sql = @"SELECT count(*), avg(b) FROM t2 WHERE b >= ? AND b < ?;"; 109 | self.iterations = 50; 110 | } 111 | 112 | -(void) bind:(NSInteger)i { 113 | NSInteger lwr = i * 50; 114 | NSInteger upr = (i + 10) * 50; 115 | 116 | sqlite3_bind_int(stmt, 1, (int)lwr); 117 | sqlite3_bind_int(stmt, 2, (int)upr); 118 | } 119 | 120 | @end 121 | 122 | @implementation SelectOnStringCompareTest 123 | 124 | -(void) setup { 125 | self.name = @"50 SELECTs on string comparison"; 126 | self.sql = @"SELECT count(*), avg(b) FROM t2 WHERE c LIKE '%' || ? || '%'"; 127 | self.iterations = 50; 128 | } 129 | 130 | -(void) bind:(NSInteger)i { 131 | sqlite3_bind_text(stmt, 1, [[NSString stringWithFormat:@"%ld", (long)i] UTF8String], -1, SQLITE_TRANSIENT); 132 | } 133 | 134 | @end 135 | 136 | @implementation CreateIndexTest 137 | 138 | -(void) setup { 139 | self.name = @"Create 2 indexes"; 140 | self.sql = @"CREATE INDEX i2a ON t2(a); CREATE INDEX i2b ON t2(b);"; 141 | } 142 | 143 | -(void) runTest:(sqlite3 *)db { 144 | sqlite3_exec(db, "CREATE INDEX i2a ON t2(a);", NULL, NULL, NULL); 145 | sqlite3_exec(db, "CREATE INDEX i2b ON t2(b);", NULL, NULL, NULL); 146 | } 147 | 148 | @end 149 | 150 | @implementation SelectWithIndexTest 151 | 152 | -(void) setup { 153 | self.name = @"2500 SELECTs with an index"; 154 | self.sql = @"SELECT count(*), avg(b) FROM t2 WHERE b >= ? AND b < ?;"; 155 | self.iterations = 2500; 156 | } 157 | 158 | -(void) bind:(NSInteger)i { 159 | NSInteger lwr = i * 100; 160 | NSInteger upr = (i + 10) * 100; 161 | 162 | sqlite3_bind_int(stmt, 1, (int)lwr); 163 | sqlite3_bind_int(stmt, 2, (int)upr); 164 | } 165 | 166 | @end 167 | 168 | 169 | @implementation UpdateWithoutIndexTest 170 | 171 | -(void) setup { 172 | self.name = @"500 UPDATEs without an index"; 173 | self.sql = @"UPDATE t1 SET b=b*2 WHERE a>= ? AND a < ?;"; 174 | self.iterations = 500; 175 | } 176 | 177 | -(void) bind:(NSInteger)i { 178 | NSInteger lwr = i * 5; 179 | NSInteger upr = (i + 1) * 5; 180 | 181 | sqlite3_bind_int(stmt, 1, (int)lwr); 182 | sqlite3_bind_int(stmt, 2, (int)upr); 183 | } 184 | 185 | @end 186 | 187 | @implementation UpdateWithIndexTest 188 | 189 | -(void) setup { 190 | self.name = @"2500 UPDATEs without an index"; 191 | self.sql = @"UPDATE t2 SET b = ? WHERE a = ?;"; 192 | self.iterations = 2500; 193 | self.useTransaction = YES; 194 | } 195 | 196 | -(void) bind:(NSInteger)i { 197 | int random = rand() * 100000; 198 | 199 | sqlite3_bind_int(stmt, 1, random); 200 | sqlite3_bind_int(stmt, 2, (int)i); 201 | } 202 | 203 | @end 204 | 205 | @implementation InsertFromSelectTest 206 | 207 | -(void) setup { 208 | self.name = @"INSERT from SELECT"; 209 | self.sql = @"INSERT INTO t1 SELECT * FROM t2; INSERT INTO t2 SELECT * FROM t1;"; 210 | } 211 | 212 | -(void) runTest:(sqlite3 *)db { 213 | sqlite3_exec(db, "INSERT INTO t1 SELECT * FROM t2;", NULL, NULL, NULL); 214 | sqlite3_exec(db, "INSERT INTO t2 SELECT * FROM t1;", NULL, NULL, NULL); 215 | } 216 | 217 | @end 218 | 219 | @implementation DeleteWithoutIndexTest 220 | 221 | -(void) setup { 222 | self.name = @"DELETE without an index"; 223 | self.sql = @"DELETE FROM t2 WHERE c LIKE '%50%';"; 224 | } 225 | 226 | -(void) runTest:(sqlite3 *)db { 227 | sqlite3_exec(db, [self.sql UTF8String], NULL, NULL, NULL); 228 | } 229 | 230 | @end 231 | 232 | @implementation DeleteWithIndexTest 233 | 234 | -(void) setup { 235 | self.name = @"DELETE with an index"; 236 | self.sql = @"DELETE FROM t2 WHERE a>10 AND a<10000;"; 237 | } 238 | 239 | -(void) runTest:(sqlite3 *)db { 240 | sqlite3_exec(db, [self.sql UTF8String], NULL, NULL, NULL); 241 | } 242 | 243 | @end 244 | 245 | @implementation BigInsertAfterDeleteTest 246 | 247 | -(void) setup { 248 | self.name = @"Big INSERT after a big DELETE"; 249 | self.sql = @"INSERT INTO t2 SELECT * FROM t1;"; 250 | } 251 | 252 | -(void) runTest:(sqlite3 *)db { 253 | sqlite3_exec(db, [self.sql UTF8String], NULL, NULL, NULL); 254 | } 255 | 256 | @end 257 | 258 | @implementation ManyInsertsAfterDeleteTest 259 | 260 | -(void) setup { 261 | self.name = @"3000 inserts after a delete"; 262 | self.sql = @"INSERT INTO t1 VALUES (?,?,?);"; 263 | self.iterations = 3000; 264 | self.useTransaction = YES; 265 | } 266 | 267 | -(void) bind:(NSInteger)i { 268 | int random = rand() * 100000; 269 | sqlite3_bind_int(stmt, 1, (int)i); 270 | sqlite3_bind_int(stmt, 2, random); 271 | sqlite3_bind_text(stmt, 3, [[NSString stringWithFormat:@"%d", random] UTF8String], -1, SQLITE_TRANSIENT); 272 | } 273 | 274 | @end 275 | 276 | @implementation DropTableTest 277 | 278 | -(void) setup { 279 | self.name = @"DROP 2 tables"; 280 | self.sql = @"DROP TABLE t1; DROP TABLE t2;"; 281 | } 282 | 283 | -(void) runTest:(sqlite3 *)db { 284 | sqlite3_exec(db, "DROP TABLE t1;", NULL, NULL, NULL); 285 | sqlite3_exec(db, "DROP TABLE t2", NULL, NULL, NULL); 286 | } 287 | 288 | @end 289 | 290 | @implementation PBKDF2Test 291 | 292 | -(void) setup { 293 | self.iterations = 7500; 294 | self.name = [NSString stringWithFormat:@"PBKDF2 Run - %ld Cycles", (long)self.iterations]; 295 | } 296 | 297 | 298 | -(void) bind:(NSInteger)i { 299 | NSString *password = @"5^ra6fU&jHWXad"; 300 | NSString *salt = @"123456789"; 301 | NSData *passwordData = [password dataUsingEncoding:NSUTF8StringEncoding]; 302 | NSData *saltData = [salt dataUsingEncoding:NSUTF8StringEncoding]; 303 | int iterationCount = 1; 304 | int keySize = 256; 305 | unsigned char buffer[1024]; 306 | CCKeyDerivationPBKDF(kCCPBKDF2, passwordData.bytes, passwordData.length, saltData.bytes, saltData.length, kCCPRFHmacAlgSHA1, iterationCount, buffer, keySize); 307 | } 308 | 309 | @end -------------------------------------------------------------------------------- /ResultViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 528 5 | 10J869 6 | 1306 7 | 1038.35 8 | 461.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 301 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUITableView 17 | 18 | 19 | YES 20 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 21 | 22 | 23 | YES 24 | 25 | YES 26 | 27 | 28 | 29 | 30 | YES 31 | 32 | IBFilesOwner 33 | IBCocoaTouchFramework 34 | 35 | 36 | IBFirstResponder 37 | IBCocoaTouchFramework 38 | 39 | 40 | 41 | 274 42 | {{0, 64}, {320, 416}} 43 | 44 | 45 | 46 | 47 | 1 48 | MSAxIDEAA 49 | 50 | NO 51 | YES 52 | NO 53 | 54 | 55 | NO 56 | 57 | IBCocoaTouchFramework 58 | NO 59 | 1 60 | 0 61 | YES 62 | 80 63 | 27 64 | 27 65 | 66 | 67 | 68 | 69 | YES 70 | 71 | 72 | view 73 | 74 | 75 | 76 | 16 77 | 78 | 79 | 80 | delegate 81 | 82 | 83 | 84 | 17 85 | 86 | 87 | 88 | dataSource 89 | 90 | 91 | 92 | 18 93 | 94 | 95 | 96 | 97 | YES 98 | 99 | 0 100 | 101 | 102 | 103 | 104 | 105 | -1 106 | 107 | 108 | File's Owner 109 | 110 | 111 | -2 112 | 113 | 114 | 115 | 116 | 9 117 | 118 | 119 | 120 | 121 | 122 | 123 | YES 124 | 125 | YES 126 | -1.CustomClassName 127 | -2.CustomClassName 128 | 9.IBEditorWindowLastContentRect 129 | 9.IBPluginDependency 130 | 131 | 132 | YES 133 | ResultViewController 134 | UIResponder 135 | {{236, 337}, {320, 480}} 136 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 137 | 138 | 139 | 140 | YES 141 | 142 | 143 | 144 | 145 | 146 | YES 147 | 148 | 149 | 150 | 151 | 19 152 | 153 | 154 | 155 | YES 156 | 157 | ResultViewController 158 | UITableViewController 159 | 160 | resultCell 161 | TestResultCell 162 | 163 | 164 | resultCell 165 | 166 | resultCell 167 | TestResultCell 168 | 169 | 170 | 171 | IBProjectSource 172 | ./Classes/ResultViewController.h 173 | 174 | 175 | 176 | TestResultCell 177 | UITableViewCell 178 | 179 | YES 180 | 181 | YES 182 | encryptedTimeLabel 183 | nameLabel 184 | normalTimeLabel 185 | slowDownLabel 186 | sqlLabel 187 | 188 | 189 | YES 190 | UILabel 191 | UILabel 192 | UILabel 193 | UILabel 194 | UILabel 195 | 196 | 197 | 198 | YES 199 | 200 | YES 201 | encryptedTimeLabel 202 | nameLabel 203 | normalTimeLabel 204 | slowDownLabel 205 | sqlLabel 206 | 207 | 208 | YES 209 | 210 | encryptedTimeLabel 211 | UILabel 212 | 213 | 214 | nameLabel 215 | UILabel 216 | 217 | 218 | normalTimeLabel 219 | UILabel 220 | 221 | 222 | slowDownLabel 223 | UILabel 224 | 225 | 226 | sqlLabel 227 | UILabel 228 | 229 | 230 | 231 | 232 | IBProjectSource 233 | ./Classes/TestResultCell.h 234 | 235 | 236 | 237 | 238 | 0 239 | IBCocoaTouchFramework 240 | 241 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 242 | 243 | 244 | 245 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 246 | 247 | 248 | YES 249 | 3 250 | 301 251 | 252 | 253 | -------------------------------------------------------------------------------- /Classes/ProgressViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ProgressViewController.m 3 | // SQLCipherSpeed 4 | // 5 | // Created by Stephen Lombardo on 5/30/09. 6 | // Copyright 2009 Zetetic LLC. All rights reserved. 7 | // 8 | 9 | #import "ProgressViewController.h" 10 | #import "ResultViewController.h" 11 | #import "TestDefinitions.h" 12 | #import "sqlite3.h" 13 | 14 | #define RESULTSET_KEY_DATE @"date" 15 | #define RESULTSET_KEY_TESTS @"tests" 16 | #define RESULTSET_KEY_PAGESZ @"pagesz" 17 | #define RESTULSET_KEY_PBKDF2ITER @"kdfiter" 18 | #define RESULTS_FILE_NAME @"results.plist" 19 | 20 | #define SECTION_AVG 0 21 | #define SECTION_PREV 1 22 | 23 | @interface ProgressViewController (Private) 24 | - (NSString *)_documentsDirectoryString; 25 | - (void)_saveResults; 26 | - (void)_showResultSet:(NSDictionary *)dict; 27 | - (void)_updateUIStartedTest:(SqlTest *)test; 28 | - (void)_updateUIStoppedTest:(SqlTest *)test; 29 | - (void)_finishRun:(NSDictionary *)dict; 30 | - (void)_generateAverages; 31 | - (void)_finishGeneratingAverages; 32 | @end 33 | 34 | @implementation ProgressViewController 35 | 36 | @synthesize testButton, progressView, testNumberLabel, tests; 37 | @synthesize resultSets; 38 | @synthesize tableView; 39 | @synthesize averageResultSet; 40 | @synthesize calculatingAverages; 41 | @synthesize headerView; 42 | @synthesize pageSizeField; 43 | @synthesize kdfIterationsField = _kdfIterationsField; 44 | 45 | - (void)dealloc { 46 | [_kdfIterationsField release]; 47 | [pageSizeField release]; 48 | [headerView release]; 49 | [averageResultSet release]; 50 | [resultSets release]; 51 | [testButton release]; 52 | [progressView release]; 53 | [testNumberLabel release]; 54 | [tests release]; 55 | [super dealloc]; 56 | } 57 | 58 | - (NSString *)_documentsDirectoryString 59 | { 60 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 61 | return [paths objectAtIndex:0]; 62 | } 63 | 64 | - (void)awakeFromNib 65 | { 66 | resultSets = [[NSMutableArray alloc] init]; 67 | calculatingAverages = NO; 68 | } 69 | 70 | - (void)viewDidLoad { 71 | [super viewDidLoad]; 72 | self.view.backgroundColor = [UIColor groupTableViewBackgroundColor]; 73 | 74 | NSString *resultsFilePath = [[self _documentsDirectoryString] stringByAppendingPathComponent: RESULTS_FILE_NAME]; 75 | 76 | NSFileManager *fm = [NSFileManager defaultManager]; 77 | 78 | if ([fm fileExistsAtPath:resultsFilePath]) 79 | { 80 | NSArray *fileResults = [NSKeyedUnarchiver unarchiveObjectWithFile:resultsFilePath]; 81 | if (fileResults) 82 | { 83 | NSSortDescriptor *sortByDate = [[NSSortDescriptor alloc] initWithKey:RESULTSET_KEY_DATE ascending:NO]; 84 | self.resultSets = [[fileResults sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortByDate]] mutableCopy]; 85 | [sortByDate release]; 86 | } 87 | } 88 | UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Tests" 89 | style:UIBarButtonItemStyleBordered 90 | target:nil 91 | action:nil]; 92 | self.navigationItem.backBarButtonItem = backButton; 93 | [backButton release]; 94 | // put an edit button on the right 95 | self.navigationItem.rightBarButtonItem = [self editButtonItem]; 96 | // reset button on the left 97 | UIBarButtonItem *lbi = [[UIBarButtonItem alloc] initWithTitle:@"Reset" 98 | style:UIBarButtonItemStyleBordered 99 | target:self 100 | action:@selector(reset:)]; 101 | self.navigationItem.leftBarButtonItem = lbi; 102 | [lbi release]; 103 | // setup the table header view 104 | self.headerView.backgroundColor = [UIColor groupTableViewBackgroundColor]; 105 | self.tableView.tableHeaderView = self.headerView; 106 | } 107 | 108 | - (void)viewWillAppear:(BOOL)animated 109 | { 110 | [super viewWillAppear:animated]; 111 | } 112 | 113 | - (void)setEditing:(BOOL)editing animated:(BOOL)animated { 114 | [super setEditing:editing animated:animated]; 115 | [tableView setEditing:editing animated:YES]; 116 | if (editing) { 117 | self.navigationItem.leftBarButtonItem.enabled = NO; 118 | testButton.enabled = NO; 119 | } else { 120 | self.navigationItem.leftBarButtonItem.enabled = YES; 121 | testButton.enabled = YES; 122 | } 123 | } 124 | 125 | - (IBAction)reset:(id)sender 126 | { 127 | UIAlertView *alert = [[UIAlertView alloc] 128 | initWithTitle:@"Confirm Reset" 129 | message:@"All result sets will be deleted, are you certain you want to reset SQLCipher Speed?" 130 | delegate:self 131 | cancelButtonTitle:@"Cancel" 132 | otherButtonTitles:@"Reset", nil]; 133 | [alert show]; 134 | [alert release]; 135 | } 136 | 137 | - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex 138 | { 139 | if (buttonIndex == 1) 140 | { 141 | // ditch the results we've got 142 | self.resultSets = [NSMutableArray array]; 143 | [self _saveResults]; 144 | [self.tableView reloadData]; 145 | // reset the pageSize field so that it's nil 146 | self.pageSizeField.text = nil; 147 | } 148 | } 149 | 150 | - (IBAction)runTest:(id) sender { 151 | // make sure we dismiss this guy, first 152 | [pageSizeField resignFirstResponder]; 153 | 154 | testButton.enabled = NO; 155 | [testButton setTitle:@"Running" forState:UIControlStateDisabled]; 156 | 157 | // perform tests on a dispatch queue to avoid blocking main thread 158 | dispatch_queue_t defaultQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); 159 | dispatch_async(defaultQueue, ^{ 160 | 161 | sqlite3 *normalDb; 162 | sqlite3 *encryptedDb; 163 | 164 | [[NSFileManager defaultManager] removeItemAtPath:[ProgressViewController pathToDatabase:@"normal.db"] error:NULL]; 165 | [[NSFileManager defaultManager] removeItemAtPath:[ProgressViewController pathToDatabase:@"encrypted.db"] error:NULL]; 166 | 167 | sqlite3_open([[ProgressViewController pathToDatabase:@"normal.db"] UTF8String], &normalDb); 168 | sqlite3_open([[ProgressViewController pathToDatabase:@"encrypted.db"] UTF8String], &encryptedDb); 169 | PragmaKeyTest *keyTest = [[[PragmaKeyTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease]; 170 | NSString *pageSize = [pageSizeField text]; 171 | if (pageSize != nil) { 172 | // intValue returns zero if the user enters non-numeric text 173 | keyTest.pageSize = [pageSize integerValue]; 174 | } 175 | if (self.kdfIterationsField.text != nil) { 176 | keyTest.kdfIterations = [self.kdfIterationsField.text integerValue]; 177 | } 178 | self.tests = [NSArray arrayWithObjects: 179 | keyTest, 180 | [[[CreateTableTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 181 | [[[InsertNoTransactionTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 182 | [[[InsertWithTransactionTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 183 | [[[SelectWithoutIndexTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 184 | [[[SelectOnStringCompareTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 185 | [[[CreateIndexTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 186 | [[[SelectWithIndexTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 187 | [[[UpdateWithoutIndexTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 188 | [[[UpdateWithIndexTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 189 | [[[InsertFromSelectTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 190 | [[[DeleteWithoutIndexTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 191 | [[[DeleteWithIndexTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 192 | [[[BigInsertAfterDeleteTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 193 | [[[ManyInsertsAfterDeleteTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 194 | [[[DropTableTest alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 195 | [[[PBKDF2Test alloc] initWithDb:normalDb encrypted:encryptedDb] autorelease], 196 | nil 197 | ]; 198 | 199 | NSUInteger count = [tests count]; 200 | 201 | for (NSInteger i = 0; i < count; i++) { 202 | SqlTest *test = (SqlTest *) [tests objectAtIndex:i]; 203 | [self performSelectorOnMainThread:@selector(_updateUIStartedTest:) withObject:test waitUntilDone:NO]; 204 | [test runTests]; 205 | [self performSelectorOnMainThread:@selector(_updateUIStoppedTest:) withObject:test waitUntilDone:NO]; 206 | } 207 | 208 | // close database files cleanly and remove the database itself 209 | sqlite3_close(normalDb); 210 | sqlite3_close(encryptedDb); 211 | 212 | [[NSFileManager defaultManager] removeItemAtPath:[ProgressViewController pathToDatabase:@"normal.db"] error:NULL]; 213 | [[NSFileManager defaultManager] removeItemAtPath:[ProgressViewController pathToDatabase:@"encrypted.db"] error:NULL]; 214 | 215 | // store the result set for later by adding it to our list... 216 | // be clever about storing the page size (argh) 217 | NSNumber *pgSizeNumber = [NSNumber numberWithInt:[pageSize intValue]]; 218 | NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:tests, RESULTSET_KEY_TESTS, 219 | pgSizeNumber, RESULTSET_KEY_PAGESZ, 220 | [NSNumber numberWithInteger:keyTest.kdfIterations], RESTULSET_KEY_PBKDF2ITER, 221 | [NSDate date], RESULTSET_KEY_DATE, nil]; 222 | 223 | [self performSelectorOnMainThread:@selector(_finishRun:) withObject:dict waitUntilDone:NO]; 224 | }); 225 | } 226 | 227 | - (void)_finishRun:(NSDictionary *)dict 228 | { 229 | // insert at top of the list 230 | [resultSets insertObject:dict atIndex:0]; 231 | 232 | // save to file 233 | [self _saveResults]; 234 | 235 | // update tableView to match results array 236 | NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:SECTION_PREV]; 237 | [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES]; 238 | 239 | testButton.enabled = YES; 240 | [testButton setTitle:@"Start" forState:UIControlStateNormal]; 241 | testNumberLabel.text = @"Test Complete!"; 242 | 243 | // if there's only one result set, just push it into view... 244 | if ([resultSets count] == 1) 245 | { 246 | [self _showResultSet:dict]; 247 | } 248 | 249 | [self _generateAverages]; 250 | } 251 | 252 | - (void)_generateAverages 253 | { 254 | calculatingAverages = YES; 255 | [tableView reloadSections:[NSIndexSet indexSetWithIndex:SECTION_AVG] withRowAnimation:NO]; 256 | 257 | // perform tests on a dispatch queue to avoid blocking main thread 258 | dispatch_queue_t defaultQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); 259 | dispatch_async(defaultQueue, ^{ 260 | 261 | NSUInteger count = [tests count]; 262 | uint64_t sqliteTimes [count]; 263 | uint64_t sqlcipherTimes [count]; 264 | // initialize them so we're adding from zero and not garbage 265 | for (int i=0; i 2 | 3 | 4 | 528 5 | 10D573 6 | 740 7 | 1038.29 8 | 460.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 62 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | 35 | 36 | IBFirstResponder 37 | 38 | 39 | 40 | 292 41 | 42 | YES 43 | 44 | 45 | 256 46 | 47 | YES 48 | 49 | 50 | 292 51 | {{18, 40}, {282, 21}} 52 | 53 | NO 54 | YES 55 | NO 56 | 1000 inserts in a transaction 57 | 58 | Helvetica 59 | 18 60 | 16 61 | 62 | 63 | 1 64 | MCAwLjI1MDk4MDQwNyAwLjUwMTk2MDgxNAA 65 | 66 | 67 | 1 68 | 10 69 | 70 | 71 | 72 | 292 73 | {{20, 7}, {90, 20}} 74 | 75 | NO 76 | YES 77 | NO 78 | 99.9% 79 | 80 | Helvetica-Bold 81 | 18 82 | 16 83 | 84 | 85 | 1 86 | MC4wOTgwMzkyMTcyOSAwLjA5ODAzOTIxNzI5IDAuMDk4MDM5MjE3MjkAA 87 | 88 | 89 | 1 90 | NO 91 | 10 92 | 93 | 94 | 95 | 292 96 | {{116, 24}, {90, 15}} 97 | 98 | NO 99 | YES 100 | NO 101 | normal 102 | 103 | Helvetica 104 | 12 105 | 16 106 | 107 | 108 | 1 109 | MC41MDE5NjA4MTQgMC41MDE5NjA4MTQgMC41MDE5NjA4MTQAA 110 | 111 | 112 | 1 113 | 10 114 | 115 | 116 | 117 | 292 118 | {{214, 24}, {90, 15}} 119 | 120 | NO 121 | YES 122 | NO 123 | encrypted 124 | 125 | 126 | 127 | 1 128 | 10 129 | 130 | 131 | 132 | 292 133 | {{20, 24}, {90, 15}} 134 | 135 | NO 136 | YES 137 | NO 138 | impact 139 | 140 | 141 | 142 | 1 143 | 10 144 | 145 | 146 | 147 | 292 148 | {{116, 7}, {90, 20}} 149 | 150 | NO 151 | YES 152 | NO 153 | 20000 ms 154 | 155 | 156 | 157 | 1 158 | NO 159 | 10 160 | 161 | 162 | 163 | 292 164 | {{214, 7}, {90, 20}} 165 | 166 | NO 167 | YES 168 | NO 169 | 30000 ms 170 | 171 | 172 | 173 | 1 174 | NO 175 | 10 176 | 177 | 178 | 179 | 292 180 | {{20, 58}, {280, 15}} 181 | 182 | NO 183 | YES 184 | NO 185 | INSERT INTO t1 VALUES (1, 3051, '3051'); 186 | 187 | Helvetica 188 | 11 189 | 16 190 | 191 | 192 | 193 | 1 194 | 10 195 | 196 | 197 | {320, 80} 198 | 199 | 200 | 3 201 | MCAwAA 202 | 203 | NO 204 | YES 205 | 4 206 | YES 207 | 208 | 209 | {320, 80} 210 | 211 | 212 | 3 213 | MSAwAA 214 | 215 | NO 216 | NO 217 | 218 | 219 | Helvetica 220 | 17 221 | 16 222 | 223 | 224 | 225 | 226 | 227 | YES 228 | 229 | 230 | nameLabel 231 | 232 | 233 | 234 | 10 235 | 236 | 237 | 238 | slowDownLabel 239 | 240 | 241 | 242 | 11 243 | 244 | 245 | 246 | normalTimeLabel 247 | 248 | 249 | 250 | 12 251 | 252 | 253 | 254 | encryptedTimeLabel 255 | 256 | 257 | 258 | 13 259 | 260 | 261 | 262 | sqlLabel 263 | 264 | 265 | 266 | 14 267 | 268 | 269 | 270 | resultCell 271 | 272 | 273 | 274 | 15 275 | 276 | 277 | 278 | 279 | YES 280 | 281 | 0 282 | 283 | 284 | 285 | 286 | 287 | -1 288 | 289 | 290 | File's Owner 291 | 292 | 293 | -2 294 | 295 | 296 | 297 | 298 | 2 299 | 300 | 301 | YES 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 3 315 | 316 | 317 | 318 | 319 | 4 320 | 321 | 322 | 323 | 324 | 6 325 | 326 | 327 | 328 | 329 | 7 330 | 331 | 332 | 333 | 334 | 8 335 | 336 | 337 | 338 | 339 | 9 340 | 341 | 342 | 343 | 344 | 16 345 | 346 | 347 | 348 | 349 | 17 350 | 351 | 352 | 353 | 354 | 355 | 356 | YES 357 | 358 | YES 359 | -1.CustomClassName 360 | -2.CustomClassName 361 | 16.IBPluginDependency 362 | 17.IBPluginDependency 363 | 2.CustomClassName 364 | 2.IBEditorWindowLastContentRect 365 | 2.IBPluginDependency 366 | 3.IBPluginDependency 367 | 4.IBPluginDependency 368 | 6.IBPluginDependency 369 | 7.IBPluginDependency 370 | 8.IBPluginDependency 371 | 9.IBPluginDependency 372 | 373 | 374 | YES 375 | RootViewController 376 | UIResponder 377 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 378 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 379 | TestResultCell 380 | {{356, 644}, {320, 80}} 381 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 382 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 383 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 384 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 385 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 386 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 387 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 388 | 389 | 390 | 391 | YES 392 | 393 | 394 | YES 395 | 396 | 397 | 398 | 399 | YES 400 | 401 | 402 | YES 403 | 404 | 405 | 406 | 17 407 | 408 | 409 | 410 | YES 411 | 412 | TestResultCell 413 | UITableViewCell 414 | 415 | YES 416 | 417 | YES 418 | encryptedTimeLabel 419 | nameLabel 420 | normalTimeLabel 421 | slowDownLabel 422 | sqlLabel 423 | 424 | 425 | YES 426 | UILabel 427 | UILabel 428 | UILabel 429 | UILabel 430 | UILabel 431 | 432 | 433 | 434 | IBProjectSource 435 | Classes/TestResultCell.h 436 | 437 | 438 | 439 | 440 | YES 441 | 442 | NSObject 443 | 444 | IBFrameworkSource 445 | Foundation.framework/Headers/NSError.h 446 | 447 | 448 | 449 | NSObject 450 | 451 | IBFrameworkSource 452 | Foundation.framework/Headers/NSFileManager.h 453 | 454 | 455 | 456 | NSObject 457 | 458 | IBFrameworkSource 459 | Foundation.framework/Headers/NSKeyValueCoding.h 460 | 461 | 462 | 463 | NSObject 464 | 465 | IBFrameworkSource 466 | Foundation.framework/Headers/NSKeyValueObserving.h 467 | 468 | 469 | 470 | NSObject 471 | 472 | IBFrameworkSource 473 | Foundation.framework/Headers/NSKeyedArchiver.h 474 | 475 | 476 | 477 | NSObject 478 | 479 | IBFrameworkSource 480 | Foundation.framework/Headers/NSNetServices.h 481 | 482 | 483 | 484 | NSObject 485 | 486 | IBFrameworkSource 487 | Foundation.framework/Headers/NSObject.h 488 | 489 | 490 | 491 | NSObject 492 | 493 | IBFrameworkSource 494 | Foundation.framework/Headers/NSPort.h 495 | 496 | 497 | 498 | NSObject 499 | 500 | IBFrameworkSource 501 | Foundation.framework/Headers/NSRunLoop.h 502 | 503 | 504 | 505 | NSObject 506 | 507 | IBFrameworkSource 508 | Foundation.framework/Headers/NSStream.h 509 | 510 | 511 | 512 | NSObject 513 | 514 | IBFrameworkSource 515 | Foundation.framework/Headers/NSThread.h 516 | 517 | 518 | 519 | NSObject 520 | 521 | IBFrameworkSource 522 | Foundation.framework/Headers/NSURL.h 523 | 524 | 525 | 526 | NSObject 527 | 528 | IBFrameworkSource 529 | Foundation.framework/Headers/NSURLConnection.h 530 | 531 | 532 | 533 | NSObject 534 | 535 | IBFrameworkSource 536 | Foundation.framework/Headers/NSXMLParser.h 537 | 538 | 539 | 540 | NSObject 541 | 542 | IBFrameworkSource 543 | UIKit.framework/Headers/UINibLoading.h 544 | 545 | 546 | 547 | UILabel 548 | UIView 549 | 550 | IBFrameworkSource 551 | UIKit.framework/Headers/UILabel.h 552 | 553 | 554 | 555 | UIResponder 556 | NSObject 557 | 558 | IBFrameworkSource 559 | UIKit.framework/Headers/UIResponder.h 560 | 561 | 562 | 563 | UITableViewCell 564 | UIView 565 | 566 | IBFrameworkSource 567 | UIKit.framework/Headers/UITableViewCell.h 568 | 569 | 570 | 571 | UIView 572 | 573 | IBFrameworkSource 574 | UIKit.framework/Headers/UITextField.h 575 | 576 | 577 | 578 | UIView 579 | UIResponder 580 | 581 | IBFrameworkSource 582 | UIKit.framework/Headers/UIView.h 583 | 584 | 585 | 586 | 587 | 0 588 | 589 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 590 | 591 | 592 | 593 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 594 | 595 | 596 | 597 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 598 | 599 | 600 | YES 601 | SQLCipherSpeed.xcodeproj 602 | 3 603 | 3.1 604 | 605 | 606 | -------------------------------------------------------------------------------- /SQLCipherSpeed.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 13035E0C135F203300ED03B9 /* icon_explosive.png in Resources */ = {isa = PBXBuildFile; fileRef = 13035E0A135F203300ED03B9 /* icon_explosive.png */; }; 11 | 13035E0D135F203300ED03B9 /* icon_explosive@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 13035E0B135F203300ED03B9 /* icon_explosive@2x.png */; }; 12 | 13035E3A135F6BE200ED03B9 /* NSDate+Helper.m in Sources */ = {isa = PBXBuildFile; fileRef = 13035E39135F6BE200ED03B9 /* NSDate+Helper.m */; }; 13 | 13035E3B135F6BE200ED03B9 /* NSDate+Helper.m in Sources */ = {isa = PBXBuildFile; fileRef = 13035E39135F6BE200ED03B9 /* NSDate+Helper.m */; }; 14 | 1D3623260D0F684500981E51 /* SQLCipherSpeedAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* SQLCipherSpeedAppDelegate.m */; }; 15 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 16 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 17 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 18 | 2871C85B180C41A30023D53D /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2871C85A180C41A30023D53D /* XCTest.framework */; }; 19 | 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; 20 | 2897A78417CD324200B45E78 /* libsqlcipher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13035DC4135F1E0C00ED03B9 /* libsqlcipher.a */; }; 21 | 2899E5600DE3E45000AC0155 /* ResultViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E55F0DE3E45000AC0155 /* ResultViewController.xib */; }; 22 | 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; 23 | 28AE5E28180C42BF008FB66F /* libsqlcipher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13035DC4135F1E0C00ED03B9 /* libsqlcipher.a */; }; 24 | 28B46E6617CD085D00672510 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28B46E6517CD085D00672510 /* Security.framework */; }; 25 | 28C286E10D94DF7D0034E888 /* ResultViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* ResultViewController.m */; }; 26 | 88498A8B157FC85300DD19A9 /* IteratedTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 88498A8A157FC85300DD19A9 /* IteratedTest.m */; }; 27 | 90023F8A1610B00E006B832E /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 90023F891610B00E006B832E /* Default-568h@2x.png */; }; 28 | 9032F1750FD22EEF001C16BA /* ProgressViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9032F1740FD22EEF001C16BA /* ProgressViewController.xib */; }; 29 | 9032F17A0FD22F95001C16BA /* ProgressViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9032F1790FD22F95001C16BA /* ProgressViewController.m */; }; 30 | 9032F2380FD2378A001C16BA /* TestDefinitions.m in Sources */ = {isa = PBXBuildFile; fileRef = 9032F2370FD2378A001C16BA /* TestDefinitions.m */; }; 31 | 9032F45C0FD2DB0F001C16BA /* IteratedSqlTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 9032F45B0FD2DB0F001C16BA /* IteratedSqlTest.m */; }; 32 | 90334B5B0FD0FC2000155FDE /* SqlTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 90334B5A0FD0FC2000155FDE /* SqlTest.m */; }; 33 | 90334C3F0FD1684B00155FDE /* TestResultCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 90334C3E0FD1684A00155FDE /* TestResultCell.m */; }; 34 | 90334C420FD16A0600155FDE /* TestResultCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 90334C410FD16A0600155FDE /* TestResultCell.xib */; }; 35 | 905CD66F130F05CD00E81E38 /* LogicTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 905CD66E130F05CD00E81E38 /* LogicTest.m */; }; 36 | /* End PBXBuildFile section */ 37 | 38 | /* Begin PBXContainerItemProxy section */ 39 | 13035DC3135F1E0C00ED03B9 /* PBXContainerItemProxy */ = { 40 | isa = PBXContainerItemProxy; 41 | containerPortal = 13035DBB135F1E0C00ED03B9 /* sqlcipher.xcodeproj */; 42 | proxyType = 2; 43 | remoteGlobalIDString = D2AAC046055464E500DB518D; 44 | remoteInfo = sqlcipher; 45 | }; 46 | 13035E04135F1ED100ED03B9 /* PBXContainerItemProxy */ = { 47 | isa = PBXContainerItemProxy; 48 | containerPortal = 13035DBB135F1E0C00ED03B9 /* sqlcipher.xcodeproj */; 49 | proxyType = 1; 50 | remoteGlobalIDString = D2AAC045055464E500DB518D; 51 | remoteInfo = sqlcipher; 52 | }; 53 | 28AE5E25180C42B7008FB66F /* PBXContainerItemProxy */ = { 54 | isa = PBXContainerItemProxy; 55 | containerPortal = 13035DBB135F1E0C00ED03B9 /* sqlcipher.xcodeproj */; 56 | proxyType = 1; 57 | remoteGlobalIDString = D2AAC045055464E500DB518D; 58 | remoteInfo = sqlcipher; 59 | }; 60 | /* End PBXContainerItemProxy section */ 61 | 62 | /* Begin PBXFileReference section */ 63 | 13035DBB135F1E0C00ED03B9 /* sqlcipher.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = sqlcipher.xcodeproj; path = sqlcipher/sqlcipher.xcodeproj; sourceTree = ""; }; 64 | 13035E0A135F203300ED03B9 /* icon_explosive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_explosive.png; sourceTree = ""; }; 65 | 13035E0B135F203300ED03B9 /* icon_explosive@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_explosive@2x.png"; sourceTree = ""; }; 66 | 13035E38135F6BE200ED03B9 /* NSDate+Helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDate+Helper.h"; path = "nsdate-helper/NSDate+Helper.h"; sourceTree = ""; }; 67 | 13035E39135F6BE200ED03B9 /* NSDate+Helper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDate+Helper.m"; path = "nsdate-helper/NSDate+Helper.m"; sourceTree = ""; }; 68 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 69 | 1D3623240D0F684500981E51 /* SQLCipherSpeedAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLCipherSpeedAppDelegate.h; sourceTree = ""; }; 70 | 1D3623250D0F684500981E51 /* SQLCipherSpeedAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQLCipherSpeedAppDelegate.m; sourceTree = ""; }; 71 | 1D6058910D05DD3D006BFB54 /* SQLCipherSpeed.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SQLCipherSpeed.app; sourceTree = BUILT_PRODUCTS_DIR; }; 72 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 73 | 2871C85A180C41A30023D53D /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 74 | 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 75 | 2899E55F0DE3E45000AC0155 /* ResultViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ResultViewController.xib; sourceTree = ""; }; 76 | 28A0AAE50D9B0CCF005BE974 /* SQLCipherSpeed_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLCipherSpeed_Prefix.pch; sourceTree = ""; }; 77 | 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 78 | 28B46E6517CD085D00672510 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 79 | 28C286DF0D94DF7D0034E888 /* ResultViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultViewController.h; sourceTree = ""; }; 80 | 28C286E00D94DF7D0034E888 /* ResultViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ResultViewController.m; sourceTree = ""; }; 81 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 82 | 88498A89157FC85300DD19A9 /* IteratedTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IteratedTest.h; sourceTree = ""; }; 83 | 88498A8A157FC85300DD19A9 /* IteratedTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IteratedTest.m; sourceTree = ""; }; 84 | 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 85 | 90023F891610B00E006B832E /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 86 | 9032F1740FD22EEF001C16BA /* ProgressViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProgressViewController.xib; sourceTree = ""; }; 87 | 9032F1780FD22F95001C16BA /* ProgressViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgressViewController.h; sourceTree = ""; }; 88 | 9032F1790FD22F95001C16BA /* ProgressViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProgressViewController.m; sourceTree = ""; }; 89 | 9032F2360FD2378A001C16BA /* TestDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestDefinitions.h; sourceTree = ""; }; 90 | 9032F2370FD2378A001C16BA /* TestDefinitions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestDefinitions.m; sourceTree = ""; }; 91 | 9032F45A0FD2DB0F001C16BA /* IteratedSqlTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IteratedSqlTest.h; sourceTree = ""; }; 92 | 9032F45B0FD2DB0F001C16BA /* IteratedSqlTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IteratedSqlTest.m; sourceTree = ""; }; 93 | 90334B590FD0FC2000155FDE /* SqlTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SqlTest.h; sourceTree = ""; }; 94 | 90334B5A0FD0FC2000155FDE /* SqlTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SqlTest.m; sourceTree = ""; }; 95 | 90334C3D0FD1684A00155FDE /* TestResultCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestResultCell.h; sourceTree = ""; }; 96 | 90334C3E0FD1684A00155FDE /* TestResultCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestResultCell.m; sourceTree = ""; }; 97 | 90334C410FD16A0600155FDE /* TestResultCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TestResultCell.xib; sourceTree = ""; }; 98 | 905CD64D130F03CB00E81E38 /* Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; 99 | 905CD64E130F03CB00E81E38 /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 100 | 905CD66E130F05CD00E81E38 /* LogicTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogicTest.m; sourceTree = ""; }; 101 | /* End PBXFileReference section */ 102 | 103 | /* Begin PBXFrameworksBuildPhase section */ 104 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 105 | isa = PBXFrameworksBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | 2897A78417CD324200B45E78 /* libsqlcipher.a in Frameworks */, 109 | 28B46E6617CD085D00672510 /* Security.framework in Frameworks */, 110 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 111 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 112 | 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, 113 | ); 114 | runOnlyForDeploymentPostprocessing = 0; 115 | }; 116 | 905CD64A130F03CB00E81E38 /* Frameworks */ = { 117 | isa = PBXFrameworksBuildPhase; 118 | buildActionMask = 2147483647; 119 | files = ( 120 | 28AE5E28180C42BF008FB66F /* libsqlcipher.a in Frameworks */, 121 | 2871C85B180C41A30023D53D /* XCTest.framework in Frameworks */, 122 | ); 123 | runOnlyForDeploymentPostprocessing = 0; 124 | }; 125 | /* End PBXFrameworksBuildPhase section */ 126 | 127 | /* Begin PBXGroup section */ 128 | 080E96DDFE201D6D7F000001 /* Classes */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 28C286DF0D94DF7D0034E888 /* ResultViewController.h */, 132 | 28C286E00D94DF7D0034E888 /* ResultViewController.m */, 133 | 1D3623240D0F684500981E51 /* SQLCipherSpeedAppDelegate.h */, 134 | 1D3623250D0F684500981E51 /* SQLCipherSpeedAppDelegate.m */, 135 | 90334B590FD0FC2000155FDE /* SqlTest.h */, 136 | 90334B5A0FD0FC2000155FDE /* SqlTest.m */, 137 | 90334C3D0FD1684A00155FDE /* TestResultCell.h */, 138 | 90334C3E0FD1684A00155FDE /* TestResultCell.m */, 139 | 9032F1780FD22F95001C16BA /* ProgressViewController.h */, 140 | 9032F1790FD22F95001C16BA /* ProgressViewController.m */, 141 | 9032F2360FD2378A001C16BA /* TestDefinitions.h */, 142 | 9032F2370FD2378A001C16BA /* TestDefinitions.m */, 143 | 9032F45A0FD2DB0F001C16BA /* IteratedSqlTest.h */, 144 | 9032F45B0FD2DB0F001C16BA /* IteratedSqlTest.m */, 145 | 905CD66E130F05CD00E81E38 /* LogicTest.m */, 146 | 88498A89157FC85300DD19A9 /* IteratedTest.h */, 147 | 88498A8A157FC85300DD19A9 /* IteratedTest.m */, 148 | ); 149 | path = Classes; 150 | sourceTree = ""; 151 | }; 152 | 13035DBC135F1E0C00ED03B9 /* Products */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 13035DC4135F1E0C00ED03B9 /* libsqlcipher.a */, 156 | ); 157 | name = Products; 158 | sourceTree = ""; 159 | }; 160 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 1D6058910D05DD3D006BFB54 /* SQLCipherSpeed.app */, 164 | 905CD64D130F03CB00E81E38 /* Tests.octest */, 165 | ); 166 | name = Products; 167 | sourceTree = ""; 168 | }; 169 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 90023F891610B00E006B832E /* Default-568h@2x.png */, 173 | 13035DBB135F1E0C00ED03B9 /* sqlcipher.xcodeproj */, 174 | 080E96DDFE201D6D7F000001 /* Classes */, 175 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 176 | 29B97317FDCFA39411CA2CEA /* Resources */, 177 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 178 | 19C28FACFE9D520D11CA2CBB /* Products */, 179 | 905CD64E130F03CB00E81E38 /* Tests-Info.plist */, 180 | ); 181 | name = CustomTemplate; 182 | sourceTree = ""; 183 | }; 184 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 13035E38135F6BE200ED03B9 /* NSDate+Helper.h */, 188 | 13035E39135F6BE200ED03B9 /* NSDate+Helper.m */, 189 | 28A0AAE50D9B0CCF005BE974 /* SQLCipherSpeed_Prefix.pch */, 190 | 29B97316FDCFA39411CA2CEA /* main.m */, 191 | ); 192 | name = "Other Sources"; 193 | sourceTree = ""; 194 | }; 195 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 13035E0A135F203300ED03B9 /* icon_explosive.png */, 199 | 13035E0B135F203300ED03B9 /* icon_explosive@2x.png */, 200 | 2899E55F0DE3E45000AC0155 /* ResultViewController.xib */, 201 | 28AD735F0D9D9599002E5188 /* MainWindow.xib */, 202 | 8D1107310486CEB800E47090 /* Info.plist */, 203 | 90334C410FD16A0600155FDE /* TestResultCell.xib */, 204 | 9032F1740FD22EEF001C16BA /* ProgressViewController.xib */, 205 | ); 206 | name = Resources; 207 | sourceTree = ""; 208 | }; 209 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | 2871C85A180C41A30023D53D /* XCTest.framework */, 213 | 28B46E6517CD085D00672510 /* Security.framework */, 214 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 215 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 216 | 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, 217 | ); 218 | name = Frameworks; 219 | sourceTree = ""; 220 | }; 221 | /* End PBXGroup section */ 222 | 223 | /* Begin PBXNativeTarget section */ 224 | 1D6058900D05DD3D006BFB54 /* SQLCipherSpeed */ = { 225 | isa = PBXNativeTarget; 226 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SQLCipherSpeed" */; 227 | buildPhases = ( 228 | 1D60588D0D05DD3D006BFB54 /* Resources */, 229 | 1D60588E0D05DD3D006BFB54 /* Sources */, 230 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 231 | ); 232 | buildRules = ( 233 | ); 234 | dependencies = ( 235 | 13035E05135F1ED100ED03B9 /* PBXTargetDependency */, 236 | ); 237 | name = SQLCipherSpeed; 238 | productName = SQLCipherSpeed; 239 | productReference = 1D6058910D05DD3D006BFB54 /* SQLCipherSpeed.app */; 240 | productType = "com.apple.product-type.application"; 241 | }; 242 | 905CD64C130F03CB00E81E38 /* Tests */ = { 243 | isa = PBXNativeTarget; 244 | buildConfigurationList = 905CD652130F03CC00E81E38 /* Build configuration list for PBXNativeTarget "Tests" */; 245 | buildPhases = ( 246 | 905CD648130F03CB00E81E38 /* Resources */, 247 | 905CD649130F03CB00E81E38 /* Sources */, 248 | 905CD64A130F03CB00E81E38 /* Frameworks */, 249 | 905CD64B130F03CB00E81E38 /* ShellScript */, 250 | ); 251 | buildRules = ( 252 | ); 253 | dependencies = ( 254 | 28AE5E26180C42B7008FB66F /* PBXTargetDependency */, 255 | ); 256 | name = Tests; 257 | productName = Tests; 258 | productReference = 905CD64D130F03CB00E81E38 /* Tests.octest */; 259 | productType = "com.apple.product-type.bundle.ocunit-test"; 260 | }; 261 | /* End PBXNativeTarget section */ 262 | 263 | /* Begin PBXProject section */ 264 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 265 | isa = PBXProject; 266 | attributes = { 267 | LastUpgradeCheck = 0420; 268 | TargetAttributes = { 269 | 1D6058900D05DD3D006BFB54 = { 270 | DevelopmentTeam = PD7G6HRMGV; 271 | }; 272 | }; 273 | }; 274 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SQLCipherSpeed" */; 275 | compatibilityVersion = "Xcode 3.2"; 276 | developmentRegion = English; 277 | hasScannedForEncodings = 1; 278 | knownRegions = ( 279 | English, 280 | Japanese, 281 | French, 282 | German, 283 | en, 284 | ); 285 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 286 | projectDirPath = ""; 287 | projectReferences = ( 288 | { 289 | ProductGroup = 13035DBC135F1E0C00ED03B9 /* Products */; 290 | ProjectRef = 13035DBB135F1E0C00ED03B9 /* sqlcipher.xcodeproj */; 291 | }, 292 | ); 293 | projectRoot = ""; 294 | targets = ( 295 | 1D6058900D05DD3D006BFB54 /* SQLCipherSpeed */, 296 | 905CD64C130F03CB00E81E38 /* Tests */, 297 | ); 298 | }; 299 | /* End PBXProject section */ 300 | 301 | /* Begin PBXReferenceProxy section */ 302 | 13035DC4135F1E0C00ED03B9 /* libsqlcipher.a */ = { 303 | isa = PBXReferenceProxy; 304 | fileType = archive.ar; 305 | path = libsqlcipher.a; 306 | remoteRef = 13035DC3135F1E0C00ED03B9 /* PBXContainerItemProxy */; 307 | sourceTree = BUILT_PRODUCTS_DIR; 308 | }; 309 | /* End PBXReferenceProxy section */ 310 | 311 | /* Begin PBXResourcesBuildPhase section */ 312 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 313 | isa = PBXResourcesBuildPhase; 314 | buildActionMask = 2147483647; 315 | files = ( 316 | 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */, 317 | 2899E5600DE3E45000AC0155 /* ResultViewController.xib in Resources */, 318 | 90334C420FD16A0600155FDE /* TestResultCell.xib in Resources */, 319 | 9032F1750FD22EEF001C16BA /* ProgressViewController.xib in Resources */, 320 | 13035E0C135F203300ED03B9 /* icon_explosive.png in Resources */, 321 | 13035E0D135F203300ED03B9 /* icon_explosive@2x.png in Resources */, 322 | 90023F8A1610B00E006B832E /* Default-568h@2x.png in Resources */, 323 | ); 324 | runOnlyForDeploymentPostprocessing = 0; 325 | }; 326 | 905CD648130F03CB00E81E38 /* Resources */ = { 327 | isa = PBXResourcesBuildPhase; 328 | buildActionMask = 2147483647; 329 | files = ( 330 | ); 331 | runOnlyForDeploymentPostprocessing = 0; 332 | }; 333 | /* End PBXResourcesBuildPhase section */ 334 | 335 | /* Begin PBXShellScriptBuildPhase section */ 336 | 905CD64B130F03CB00E81E38 /* ShellScript */ = { 337 | isa = PBXShellScriptBuildPhase; 338 | buildActionMask = 2147483647; 339 | files = ( 340 | ); 341 | inputPaths = ( 342 | ); 343 | outputPaths = ( 344 | ); 345 | runOnlyForDeploymentPostprocessing = 0; 346 | shellPath = /bin/sh; 347 | shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; 348 | }; 349 | /* End PBXShellScriptBuildPhase section */ 350 | 351 | /* Begin PBXSourcesBuildPhase section */ 352 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 353 | isa = PBXSourcesBuildPhase; 354 | buildActionMask = 2147483647; 355 | files = ( 356 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 357 | 1D3623260D0F684500981E51 /* SQLCipherSpeedAppDelegate.m in Sources */, 358 | 28C286E10D94DF7D0034E888 /* ResultViewController.m in Sources */, 359 | 90334B5B0FD0FC2000155FDE /* SqlTest.m in Sources */, 360 | 90334C3F0FD1684B00155FDE /* TestResultCell.m in Sources */, 361 | 9032F17A0FD22F95001C16BA /* ProgressViewController.m in Sources */, 362 | 9032F2380FD2378A001C16BA /* TestDefinitions.m in Sources */, 363 | 9032F45C0FD2DB0F001C16BA /* IteratedSqlTest.m in Sources */, 364 | 13035E3A135F6BE200ED03B9 /* NSDate+Helper.m in Sources */, 365 | 88498A8B157FC85300DD19A9 /* IteratedTest.m in Sources */, 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | }; 369 | 905CD649130F03CB00E81E38 /* Sources */ = { 370 | isa = PBXSourcesBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | 905CD66F130F05CD00E81E38 /* LogicTest.m in Sources */, 374 | 13035E3B135F6BE200ED03B9 /* NSDate+Helper.m in Sources */, 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | }; 378 | /* End PBXSourcesBuildPhase section */ 379 | 380 | /* Begin PBXTargetDependency section */ 381 | 13035E05135F1ED100ED03B9 /* PBXTargetDependency */ = { 382 | isa = PBXTargetDependency; 383 | name = sqlcipher; 384 | targetProxy = 13035E04135F1ED100ED03B9 /* PBXContainerItemProxy */; 385 | }; 386 | 28AE5E26180C42B7008FB66F /* PBXTargetDependency */ = { 387 | isa = PBXTargetDependency; 388 | name = sqlcipher; 389 | targetProxy = 28AE5E25180C42B7008FB66F /* PBXContainerItemProxy */; 390 | }; 391 | /* End PBXTargetDependency section */ 392 | 393 | /* Begin XCBuildConfiguration section */ 394 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | ALWAYS_SEARCH_USER_PATHS = NO; 398 | CODE_SIGN_IDENTITY = "iPhone Developer"; 399 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 400 | COPY_PHASE_STRIP = NO; 401 | GCC_DYNAMIC_NO_PIC = NO; 402 | GCC_OPTIMIZATION_LEVEL = 0; 403 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 404 | GCC_PREFIX_HEADER = SQLCipherSpeed_Prefix.pch; 405 | HEADER_SEARCH_PATHS = ( 406 | ./sqlcipher, 407 | "./nsdate+helper", 408 | ); 409 | INFOPLIST_FILE = Info.plist; 410 | LIBRARY_SEARCH_PATHS = ( 411 | "$(inherited)", 412 | "\"$(SRCROOT)\"", 413 | ); 414 | OTHER_LDFLAGS = ( 415 | "-ObjC", 416 | "-all_load", 417 | ); 418 | PRODUCT_NAME = SQLCipherSpeed; 419 | PROVISIONING_PROFILE = ""; 420 | "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; 421 | }; 422 | name = Debug; 423 | }; 424 | 1D6058950D05DD3E006BFB54 /* Release */ = { 425 | isa = XCBuildConfiguration; 426 | buildSettings = { 427 | ALWAYS_SEARCH_USER_PATHS = NO; 428 | CODE_SIGN_IDENTITY = "iPhone Developer"; 429 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 430 | COPY_PHASE_STRIP = YES; 431 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 432 | GCC_PREFIX_HEADER = SQLCipherSpeed_Prefix.pch; 433 | HEADER_SEARCH_PATHS = ( 434 | ./sqlcipher, 435 | "./nsdate+helper", 436 | ); 437 | INFOPLIST_FILE = Info.plist; 438 | LIBRARY_SEARCH_PATHS = ( 439 | "$(inherited)", 440 | "\"$(SRCROOT)\"", 441 | ); 442 | OTHER_LDFLAGS = ( 443 | "-ObjC", 444 | "-all_load", 445 | ); 446 | PRODUCT_NAME = SQLCipherSpeed; 447 | PROVISIONING_PROFILE = ""; 448 | }; 449 | name = Release; 450 | }; 451 | 905CD650130F03CC00E81E38 /* Debug */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | ALWAYS_SEARCH_USER_PATHS = NO; 455 | COPY_PHASE_STRIP = NO; 456 | FRAMEWORK_SEARCH_PATHS = ( 457 | "\\\"$(SDKROOT)/Developer/Library/Frameworks\\\"", 458 | "\\\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\\\"", 459 | "$(DEVELOPER_FRAMEWORKS_DIR)", 460 | ); 461 | GCC_DYNAMIC_NO_PIC = NO; 462 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 463 | GCC_OPTIMIZATION_LEVEL = 0; 464 | INFOPLIST_FILE = "Tests-Info.plist"; 465 | OTHER_CFLAGS = "-DSQLITE_HAS_CODEC"; 466 | OTHER_LDFLAGS = ( 467 | "-framework", 468 | Foundation, 469 | "-framework", 470 | UIKit, 471 | "-ObjC", 472 | "-all_load", 473 | ); 474 | PRODUCT_NAME = Tests; 475 | SDKROOT = iphoneos; 476 | WRAPPER_EXTENSION = octest; 477 | }; 478 | name = Debug; 479 | }; 480 | 905CD651130F03CC00E81E38 /* Release */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | ALWAYS_SEARCH_USER_PATHS = NO; 484 | COPY_PHASE_STRIP = YES; 485 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 486 | FRAMEWORK_SEARCH_PATHS = ( 487 | "\\\"$(SDKROOT)/Developer/Library/Frameworks\\\"", 488 | "\\\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\\\"", 489 | "$(DEVELOPER_FRAMEWORKS_DIR)", 490 | ); 491 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 492 | INFOPLIST_FILE = "Tests-Info.plist"; 493 | OTHER_CFLAGS = "-DSQLITE_HAS_CODEC"; 494 | OTHER_LDFLAGS = ( 495 | "-framework", 496 | Foundation, 497 | "-framework", 498 | UIKit, 499 | "-ObjC", 500 | "-all_load", 501 | ); 502 | PRODUCT_NAME = Tests; 503 | SDKROOT = iphoneos; 504 | WRAPPER_EXTENSION = octest; 505 | ZERO_LINK = NO; 506 | }; 507 | name = Release; 508 | }; 509 | C01FCF4F08A954540054247B /* Debug */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | ARCHS = ( 513 | "$(ARCHS_STANDARD)", 514 | armv7s, 515 | ); 516 | CODE_SIGN_IDENTITY = "iPhone Developer"; 517 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 518 | GCC_C_LANGUAGE_STANDARD = c99; 519 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 520 | GCC_WARN_UNUSED_VARIABLE = YES; 521 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 522 | "IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0; 523 | ONLY_ACTIVE_ARCH = YES; 524 | OTHER_LDFLAGS = ""; 525 | PROVISIONING_PROFILE = ""; 526 | SDKROOT = iphoneos; 527 | VALID_ARCHS = "arm64 armv7 armv7s"; 528 | }; 529 | name = Debug; 530 | }; 531 | C01FCF5008A954540054247B /* Release */ = { 532 | isa = XCBuildConfiguration; 533 | buildSettings = { 534 | ARCHS = ( 535 | "$(ARCHS_STANDARD)", 536 | armv7s, 537 | ); 538 | CODE_SIGN_IDENTITY = "iPhone Developer"; 539 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 540 | GCC_C_LANGUAGE_STANDARD = c99; 541 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 542 | GCC_WARN_UNUSED_VARIABLE = YES; 543 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 544 | "IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0; 545 | ONLY_ACTIVE_ARCH = NO; 546 | OTHER_LDFLAGS = ""; 547 | PROVISIONING_PROFILE = ""; 548 | SDKROOT = iphoneos; 549 | VALID_ARCHS = "arm64 armv7 armv7s"; 550 | }; 551 | name = Release; 552 | }; 553 | /* End XCBuildConfiguration section */ 554 | 555 | /* Begin XCConfigurationList section */ 556 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SQLCipherSpeed" */ = { 557 | isa = XCConfigurationList; 558 | buildConfigurations = ( 559 | 1D6058940D05DD3E006BFB54 /* Debug */, 560 | 1D6058950D05DD3E006BFB54 /* Release */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | 905CD652130F03CC00E81E38 /* Build configuration list for PBXNativeTarget "Tests" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 905CD650130F03CC00E81E38 /* Debug */, 569 | 905CD651130F03CC00E81E38 /* Release */, 570 | ); 571 | defaultConfigurationIsVisible = 0; 572 | defaultConfigurationName = Release; 573 | }; 574 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SQLCipherSpeed" */ = { 575 | isa = XCConfigurationList; 576 | buildConfigurations = ( 577 | C01FCF4F08A954540054247B /* Debug */, 578 | C01FCF5008A954540054247B /* Release */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | /* End XCConfigurationList section */ 584 | }; 585 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 586 | } 587 | --------------------------------------------------------------------------------