title: SqlCipher does not encrypt
body: <p>I dont get compile errors, but my database does not encrypt...</p>
  
  <pre><code>const char* key = [@"BIGSecret" UTF8String];
      int err = sqlite3_key(database, key, strlen(key));
  
      if (sqlite3_exec(database, (const char*) "SELECT count(*) FROM animals;", NULL, NULL, NULL) == SQLITE_OK) {
          // database has been initialized
      }
  </code></pre>
  
  <p>I am referring site <a href="http://sqlcipher.net/documentation/ios" rel="nofollow">http://sqlcipher.net/documentation/ios</a> and using SQLiteTutorial example which has AnimalDatabase.sql database already in it.</p>
  
  <p>I also came to know that encryption wont work on the existing database, so i tried the below code:</p>
  
  <pre><code>      - (void)encryptDB
      {
          NSLog (@"Start");
          sqlite3 *DB = [self getNewDBConnection];
  
          sqlite3_exec(DB, "ATTACH DATABASE AnimalDatabase.sql AS encrypted KEY 1234;", NULL, NULL,  NULL);
  
      sqlite3_exec(DB, "CREATE TABLE encrypted.Account(id,Name,Desc,Image);", NULL, NULL, NULL);
      sqlite3_exec(DB, "INSERT INTO encrypted.Account SELECT * FROM animals;", NULL, NULL, NULL);
  
      sqlite3_exec(DB, "DETACH DATABASE encrypted;", NULL, NULL, NULL);   
      NSLog (@"End");
      }
  
      - (sqlite3 *)getNewDBConnection{
          if (sqlite3_open([databasePath UTF8String], &amp;newDBconnection) == SQLITE_OK) { // opening AnimalDatabase.sql
  
          NSLog(@"Database Successfully Opened :)");
      } else {
          NSLog(@"Error in opening database :(");
      } 
      return newDBconnection; 
  } 
  </code></pre>
  
  <p>But still no success. Can anyone help?</p>