System.Data.SQLite
Check-in [ab312a7adf]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:signature changes and bugfixes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sourceforge
Files: files | file ages | folders
SHA1: ab312a7adf75fce1a5bb59a80b6cbcc6f45392e2
User & Date: rmsimpson 2005-08-28 04:31:20
Context
2005-08-28
04:32
Minor updates check-in: 1ebbe1cd87 user: rmsimpson tags: sourceforge
04:31
signature changes and bugfixes check-in: ab312a7adf user: rmsimpson tags: sourceforge
04:30
1.0.17 docs check-in: 218601b0c3 user: rmsimpson tags: sourceforge
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/SQLiteConnection.cs.

288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
    /// Requires Win2K and above, plus a valid EFS certificate (which is beyond the scope
    /// of this function description).
    /// </remarks>
    /// <param name="databaseFilename">The file to check</param>
    /// <returns>true if the file is encrypted</returns>
    static public bool IsEncrypted(string databaseFilename)
    {
      long status;
      int n = UnsafeNativeMethods.sqlite3_encryptedstatus(databaseFilename, out status);
      if (n == 0) throw new System.ComponentModel.Win32Exception();

      return (status == 1);
    }

    /// <summary>







|







288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
    /// Requires Win2K and above, plus a valid EFS certificate (which is beyond the scope
    /// of this function description).
    /// </remarks>
    /// <param name="databaseFilename">The file to check</param>
    /// <returns>true if the file is encrypted</returns>
    static public bool IsEncrypted(string databaseFilename)
    {
      int status;
      int n = UnsafeNativeMethods.sqlite3_encryptedstatus(databaseFilename, out status);
      if (n == 0) throw new System.ComponentModel.Win32Exception();

      return (status == 1);
    }

    /// <summary>

Changes to System.Data.SQLite/UnsafeNativeMethods.cs.

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_encryptfile(string fileName);

    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_decryptfile(string fileName);

    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_encryptedstatus(string fileName, out long fileStatus);

    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_compressfile(string fileName);

    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_decompressfile(string fileName);
  }
}







|








224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_encryptfile(string fileName);

    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_decryptfile(string fileName);

    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_encryptedstatus(string fileName, out int fileStatus);

    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_compressfile(string fileName);

    [DllImport(SQLITE_DLL, CharSet = CharSet.Unicode, SetLastError = true)]
    internal static extern int sqlite3_decompressfile(string fileName);
  }
}