August Mueller 12 years ago
parent
commit
6740330e8a
3 changed files with 6 additions and 2 deletions
  1. 3 0
      CHANGES_AND_TODO_LIST.txt
  2. 1 0
      CONTRIBUTORS.txt
  3. 2 2
      src/FMDatabase.m

+ 3 - 0
CHANGES_AND_TODO_LIST.txt

@@ -3,6 +3,9 @@ Zip, nada, zilch.  Got any ideas?
 
 If you would like to contribute some code- awesome!  I just ask that you make it conform to the coding conventions already set in here, and to add a couple of tests for your new code to fmdb.m.  And of course, the code should be of general use to more than just a couple of folks.  Send your patches to gus@flyingmeat.com.
 
+2013.04.17
+    Added two new methods to FMDatabase for setting crypto keys, which take NSData objects.  Thanks to Phillip Kast for the patch! <https://github.com/ccgus/fmdb/pull/135>
+
 2013.02.19
     Fixed potential dereference of NULL outErr argument in -startSavePointWithName:error: and -releaseSavePointWithName:error:.  Thanks to Jim Correia for the patch!
 

+ 1 - 0
CONTRIBUTORS.txt

@@ -37,5 +37,6 @@ Samuel Chen
 Daniel Dickison
 Peter Carr
 Jim Correia
+Phillip Kast
 
 Aaaaannnd, Gus Mueller (that's me!)

+ 2 - 2
src/FMDatabase.m

@@ -221,7 +221,7 @@ - (BOOL)rekeyWithData:(NSData *)keyData {
         return NO;
     }
     
-    int rc = sqlite3_rekey(_db, [keyData bytes], [keyData length]);
+    int rc = sqlite3_rekey(_db, [keyData bytes], (int)[keyData length]);
     
     if (rc != SQLITE_OK) {
         NSLog(@"error on rekey: %d", rc);
@@ -246,7 +246,7 @@ - (BOOL)setKeyWithData:(NSData *)keyData {
         return NO;
     }
     
-    int rc = sqlite3_key(_db, [keyData bytes], [keyData length]);
+    int rc = sqlite3_key(_db, [keyData bytes], (int)[keyData length]);
     
     return (rc == SQLITE_OK);
 #else