Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Supports encrypted databases |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sourceforge |
Files: | files | file ages | folders |
SHA1: |
0b89858658ec96ba7a411c24364ef7af |
User & Date: | rmsimpson 2006-01-10 18:41:40.000 |
Context
2006-01-10
| ||
21:03 | 1.0.24.3 beta check-in: 2620c61dbd user: rmsimpson tags: sourceforge | |
18:41 | Supports encrypted databases check-in: 0b89858658 user: rmsimpson tags: sourceforge | |
18:38 | no message check-in: 8dc721be16 user: rmsimpson tags: sourceforge | |
Changes
Changes to System.Data.SQLite/SQLite3.cs.
︙ | ︙ | |||
520 521 522 523 524 525 526 527 528 | return UnsafeNativeMethods.sqlite3_aggregate_context_interop(context, 1); } internal override void SetRealColNames(bool bOn) { UnsafeNativeMethods.sqlite3_realcolnames(_sql, Convert.ToInt32(bOn)); } } } | > > > > > > > > > > > > | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | return UnsafeNativeMethods.sqlite3_aggregate_context_interop(context, 1); } internal override void SetRealColNames(bool bOn) { UnsafeNativeMethods.sqlite3_realcolnames(_sql, Convert.ToInt32(bOn)); } internal override void SetPassword(byte[] passwordBytes) { int n = UnsafeNativeMethods.sqlite3_key_interop(_sql, passwordBytes, passwordBytes.Length); if (n > 0) throw new SQLiteException(n, SQLiteLastError()); } internal override void ChangePassword(byte[] newPasswordBytes) { int n = UnsafeNativeMethods.sqlite3_rekey_interop(_sql, newPasswordBytes, (newPasswordBytes == null) ? 0 : newPasswordBytes.Length); if (n > 0) throw new SQLiteException(n, SQLiteLastError()); } } } |
Changes to System.Data.SQLite/SQLiteBase.cs.
︙ | ︙ | |||
181 182 183 184 185 186 187 188 189 190 191 192 193 194 | internal abstract void ReturnDouble(int context, double value); internal abstract void ReturnError(int context, string value); internal abstract void ReturnInt32(int context, Int32 value); internal abstract void ReturnInt64(int context, Int64 value); internal abstract void ReturnNull(int context); internal abstract void ReturnText(int context, string value); protected virtual void Dispose(bool bDisposing) { } public void Dispose() { Dispose(true); | > > > | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | internal abstract void ReturnDouble(int context, double value); internal abstract void ReturnError(int context, string value); internal abstract void ReturnInt32(int context, Int32 value); internal abstract void ReturnInt64(int context, Int64 value); internal abstract void ReturnNull(int context); internal abstract void ReturnText(int context, string value); internal abstract void SetPassword(byte[] passwordBytes); internal abstract void ChangePassword(byte[] newPasswordBytes); protected virtual void Dispose(bool bDisposing) { } public void Dispose() { Dispose(true); |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConnection.cs.
︙ | ︙ | |||
82 83 84 85 86 87 88 89 90 91 92 93 94 95 | /// </item> /// <item> /// <description>Page Size</description> /// <description>{size in bytes}</description> /// <description>N</description> /// <description>1024</description> /// </item> /// </list> /// </remarks> public sealed class SQLiteConnection : DbConnection, ICloneable { /// <summary> /// State of the current connection /// </summary> | > > > > > > | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | /// </item> /// <item> /// <description>Page Size</description> /// <description>{size in bytes}</description> /// <description>N</description> /// <description>1024</description> /// </item> /// <item> /// <description>Password</description> /// <description>{password}</description> /// <description>N</description> /// <description></description> /// </item> /// </list> /// </remarks> public sealed class SQLiteConnection : DbConnection, ICloneable { /// <summary> /// State of the current connection /// </summary> |
︙ | ︙ | |||
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | /// For a full description of EFS, see the MSDN documentation. /// </summary> /// <remarks> /// 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 encrypt</param> static public void EncryptFile(string databaseFileName) { int n = UnsafeNativeMethods.sqlite3_encryptfile(databaseFileName); if (n == 0) throw new System.ComponentModel.Win32Exception(); } /// <summary> /// On NTFS volumes, this function removes the encryption attribute from the file, /// causing the file to be decrypted. See the MSDN documentation for full details on /// EFS (Encrypted File System). /// </summary> /// <remarks> /// 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 decrypt</param> static public void DecryptFile(string databaseFileName) { int n = UnsafeNativeMethods.sqlite3_decryptfile(databaseFileName); if (n == 0) throw new System.ComponentModel.Win32Exception(); } /// <summary> /// Returns true if the file is encrypted, or false otherwise. /// </summary> /// <remarks> /// 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); | > > > | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | /// For a full description of EFS, see the MSDN documentation. /// </summary> /// <remarks> /// 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 encrypt</param> [Obsolete("Define a password in the ConnectionString, call SetPassword() on a new open database, or call ChangePassword({password}) on an existing open database to encrypt the database file.")] static public void EncryptFile(string databaseFileName) { int n = UnsafeNativeMethods.sqlite3_encryptfile(databaseFileName); if (n == 0) throw new System.ComponentModel.Win32Exception(); } /// <summary> /// On NTFS volumes, this function removes the encryption attribute from the file, /// causing the file to be decrypted. See the MSDN documentation for full details on /// EFS (Encrypted File System). /// </summary> /// <remarks> /// 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 decrypt</param> [Obsolete("Call ChangePassword(null) on an open connection to decrypt an encrypted database file.")] static public void DecryptFile(string databaseFileName) { int n = UnsafeNativeMethods.sqlite3_decryptfile(databaseFileName); if (n == 0) throw new System.ComponentModel.Win32Exception(); } /// <summary> /// Returns true if the file is encrypted, or false otherwise. /// </summary> /// <remarks> /// 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> [Obsolete("EFS file encryption will be removed from future versions of this library")] 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); |
︙ | ︙ | |||
452 453 454 455 456 457 458 | /// <description>N</description> /// <description>Normal</description> /// </item> /// <item> /// <description>Page Size</description> /// <description>{size in bytes}</description> /// <description>N</description> | > > > > > | > | 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | /// <description>N</description> /// <description>Normal</description> /// </item> /// <item> /// <description>Page Size</description> /// <description>{size in bytes}</description> /// <description>N</description> /// <description>1024</description> /// </item> /// <item> /// <description>Password</description> /// <description>{password}</description> /// <description>N</description> /// <description></description> /// </item> /// </list> /// </remarks> public override string ConnectionString { get { |
︙ | ︙ | |||
538 539 540 541 542 543 544 545 546 547 548 549 550 551 | for (n = 0; n < x; n++) { arPiece = SQLiteConvert.Split(arParts[n], '='); if (arPiece.Length == 2) { ls.Add(new KeyValuePair<string, string>(arPiece[0], arPiece[1])); } } KeyValuePair<string, string>[] ar = new KeyValuePair<string, string>[ls.Count]; ls.CopyTo(ar, 0); // Return the array of key-value pairs return ar; } | > | 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | for (n = 0; n < x; n++) { arPiece = SQLiteConvert.Split(arParts[n], '='); if (arPiece.Length == 2) { ls.Add(new KeyValuePair<string, string>(arPiece[0], arPiece[1])); } else throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, "Invalid ConnectionString format for parameter \"{0}\"", (arPiece.Length > 0) ? arPiece[0] : "null")); } KeyValuePair<string, string>[] ar = new KeyValuePair<string, string>[ls.Count]; ls.CopyTo(ar, 0); // Return the array of key-value pairs return ar; } |
︙ | ︙ | |||
595 596 597 598 599 600 601 | bool bUTF16 = (Convert.ToBoolean(FindKey(opts, "UseUTF16Encoding", "False"), CultureInfo.InvariantCulture) == true); SQLiteDateFormats dateFormat = String.Compare(FindKey(opts, "DateTimeFormat", "ISO8601"), "ticks", true, CultureInfo.InvariantCulture) == 0 ? SQLiteDateFormats.Ticks : SQLiteDateFormats.ISO8601; if (bUTF16) // SQLite automatically sets the encoding of the database to UTF16 if called from sqlite3_open16() _sql = new SQLite3_UTF16(dateFormat); else _sql = new SQLite3(dateFormat); | | | > > > > > | 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 | bool bUTF16 = (Convert.ToBoolean(FindKey(opts, "UseUTF16Encoding", "False"), CultureInfo.InvariantCulture) == true); SQLiteDateFormats dateFormat = String.Compare(FindKey(opts, "DateTimeFormat", "ISO8601"), "ticks", true, CultureInfo.InvariantCulture) == 0 ? SQLiteDateFormats.Ticks : SQLiteDateFormats.ISO8601; if (bUTF16) // SQLite automatically sets the encoding of the database to UTF16 if called from sqlite3_open16() _sql = new SQLite3_UTF16(dateFormat); else _sql = new SQLite3(dateFormat); _sql.Open(strFile); string password = FindKey(opts, "Password", null); if (String.IsNullOrEmpty(password) == false) _sql.SetPassword(String.IsNullOrEmpty(password) ? null : System.Text.UTF8Encoding.UTF8.GetBytes(password)); _dataSource = System.IO.Path.GetFileNameWithoutExtension(strFile); _sql.Execute(String.Format(CultureInfo.InvariantCulture, "PRAGMA Synchronous={0}", FindKey(opts, "Synchronous", "Normal"))); _sql.Execute(String.Format(CultureInfo.InvariantCulture, "PRAGMA Cache_Size={0}", FindKey(opts, "Cache Size", "2000"))); if (String.Compare(":MEMORY:", strFile, true, CultureInfo.InvariantCulture) == 0) _sql.Execute(String.Format(CultureInfo.InvariantCulture, "PRAGMA Page_Size={0}", FindKey(opts, "Page Size", "1024"))); |
︙ | ︙ | |||
637 638 639 640 641 642 643 644 645 646 647 648 649 650 | public override ConnectionState State { get { return _connectionState; } } ///<overloads> /// The following commands are used to extract schema information out of the database. Valid schema types are: /// <list type="bullet"> /// <item> /// <description>MetaDataCollections</description> /// </item> | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 | public override ConnectionState State { get { return _connectionState; } } /// <summary> /// Change the password (or assign a password) to an open database. /// </summary> /// <remarks> /// No readers or writers may be active for this process. The database must already be open /// and if it already was password protected, the existing password must already have been supplied. /// </remarks> /// <param name="newPassword">The new password to assign to the database</param> public void ChangePassword(string newPassword) { ChangePassword(String.IsNullOrEmpty(newPassword) ? null : System.Text.UTF8Encoding.UTF8.GetBytes(newPassword)); } /// <summary> /// Change the password (or assign a password) to an open database. /// </summary> /// <remarks> /// No readers or writers may be active for this process. The database must already be open /// and if it already was password protected, the existing password must already have been supplied. /// </remarks> /// <param name="newPassword">The new password to assign to the database</param> public void ChangePassword(byte[] newPassword) { if (_connectionState != ConnectionState.Open) throw new InvalidOperationException(); _sql.ChangePassword(newPassword); } /// <summary> /// Sets the password for a password-protected database. A password-protected database is /// unusable for any operation until the password has been set. /// </summary> /// <param name="databasePassword">The password for the database</param> public void SetPassword(string databasePassword) { SetPassword(String.IsNullOrEmpty(databasePassword) ? null : System.Text.UTF8Encoding.UTF8.GetBytes(databasePassword)); } /// <summary> /// Sets the password for a password-protected database. A password-protected database is /// unusable for any operation until the password has been set. /// </summary> /// <param name="databasePassword">The password for the database</param> public void SetPassword(byte[] databasePassword) { if (_connectionState != ConnectionState.Open) throw new InvalidOperationException(); _sql.SetPassword(databasePassword); } ///<overloads> /// The following commands are used to extract schema information out of the database. Valid schema types are: /// <list type="bullet"> /// <item> /// <description>MetaDataCollections</description> /// </item> |
︙ | ︙ | |||
736 737 738 739 740 741 742 | /// <summary> /// Builds a MetaDataCollections schema datatable /// </summary> /// <returns>DataTable</returns> private static DataTable Schema_MetaDataCollections() { DataTable tbl = new DataTable("MetaDataCollections"); | < < < < | < < < | < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 | /// <summary> /// Builds a MetaDataCollections schema datatable /// </summary> /// <returns>DataTable</returns> private static DataTable Schema_MetaDataCollections() { DataTable tbl = new DataTable("MetaDataCollections"); tbl.Locale = CultureInfo.InvariantCulture; tbl.Columns.Add("CollectionName", typeof(string)); tbl.Columns.Add("NumberOfRestrictions", typeof(int)); tbl.Columns.Add("NumberOfIdentifierParts", typeof(int)); tbl.BeginLoadData(); IO.StringReader reader = new IO.StringReader(SR.MetaDataCollections); tbl.ReadXml(reader); reader.Close(); tbl.AcceptChanges(); tbl.EndLoadData(); return tbl; } |
︙ | ︙ | |||
1224 1225 1226 1227 1228 1229 1230 | tbl.AcceptChanges(); tbl.EndLoadData(); return tbl; } | < < < < < < < < < < < < < < < < < < < < < < < < < < | 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 | tbl.AcceptChanges(); tbl.EndLoadData(); return tbl; } private DataTable Schema_DataTypes() { DataTable tbl = new DataTable("DataTypes"); tbl.Locale = CultureInfo.InvariantCulture; tbl.Columns.Add("TypeName", typeof(String)); tbl.Columns.Add("ProviderDbType", typeof(int)); |
︙ | ︙ | |||
1279 1280 1281 1282 1283 1284 1285 | tbl.Columns.Add("LiteralSuffix", typeof(String)); tbl.Columns.Add("IsUnsigned", typeof(bool)); tbl.Columns.Add("MaximumScale", typeof(short)); tbl.Columns.Add("MinimumScale", typeof(short)); tbl.Columns.Add("IsConcurrencyType", typeof(bool)); tbl.BeginLoadData(); | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | | 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 | tbl.Columns.Add("LiteralSuffix", typeof(String)); tbl.Columns.Add("IsUnsigned", typeof(bool)); tbl.Columns.Add("MaximumScale", typeof(short)); tbl.Columns.Add("MinimumScale", typeof(short)); tbl.Columns.Add("IsConcurrencyType", typeof(bool)); tbl.BeginLoadData(); IO.StringReader reader = new IO.StringReader(SR.DataTypes); tbl.ReadXml(reader); reader.Close(); tbl.AcceptChanges(); tbl.EndLoadData(); return tbl; } |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteConnectionStringBuilder.cs.
︙ | ︙ | |||
133 134 135 136 137 138 139 140 141 142 143 144 145 146 | return this["Data Source"].ToString(); } set { this["Data Source"] = value; } } /// <summary> /// Gets/Sets the page size for the connection. /// </summary> [DisplayName("Page Size")] [Browsable(true)] [DefaultValue(1024)] | > > > > > > > > > > > > > > > > > > | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | return this["Data Source"].ToString(); } set { this["Data Source"] = value; } } /// <summary> /// Gets/sets the database encryption password /// </summary> [Browsable(true)] public string Password { get { if (ContainsKey("Password") == false) return ""; return this["Password"].ToString(); } set { this["Password"] = value; } } /// <summary> /// Gets/Sets the page size for the connection. /// </summary> [DisplayName("Page Size")] [Browsable(true)] [DefaultValue(1024)] |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteDataReader.cs.
︙ | ︙ | |||
504 505 506 507 508 509 510 | row[SchemaTableColumn.IsUnique] = false; row[SchemaTableColumn.IsKey] = false; row[SchemaTableOptionalColumn.IsAutoIncrement] = false; row[SchemaTableOptionalColumn.IsReadOnly] = false; row[SchemaTableColumn.BaseColumnName] = GetName(n); // Try and extract the database, table and column from the datareader | | | 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | row[SchemaTableColumn.IsUnique] = false; row[SchemaTableColumn.IsKey] = false; row[SchemaTableOptionalColumn.IsAutoIncrement] = false; row[SchemaTableOptionalColumn.IsReadOnly] = false; row[SchemaTableColumn.BaseColumnName] = GetName(n); // Try and extract the database, table and column from the datareader arName = rd.GetName(n).Split('\x01'); if (arName.Length > 1) strTable = arName[arName.Length - 2]; if (arName.Length > 2) strCatalog = arName[arName.Length - 3]; |
︙ | ︙ |
Changes to System.Data.SQLite/SQLiteFunction.cs.
︙ | ︙ | |||
442 443 444 445 446 447 448 | /// <summary> /// Manual method of registering a function. The type must still have the SQLiteFunctionAttributes in order to work /// properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported. /// </summary> /// <param name="typ">The type of the function to register</param> public static void RegisterFunction(Type typ) { | | | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | /// <summary> /// Manual method of registering a function. The type must still have the SQLiteFunctionAttributes in order to work /// properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported. /// </summary> /// <param name="typ">The type of the function to register</param> public static void RegisterFunction(Type typ) { object[] arAtt = typ.GetCustomAttributes(typeof(SQLiteFunctionAttribute), false); int u = arAtt.Length; SQLiteFunctionAttribute at; for (int y = 0; y < u; y++) { at = arAtt[y] as SQLiteFunctionAttribute; if (at != null) |
︙ | ︙ |
Changes to System.Data.SQLite/System.Data.SQLite.csproj.
︙ | ︙ | |||
10 11 12 13 14 15 16 | <RootNamespace>System.Data.SQLite</RootNamespace> <AssemblyName>System.Data.SQLite</AssemblyName> <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <PlatformFamilyName>PocketPC</PlatformFamilyName> <PlatformID>3C41C503-53EF-4c2a-8DD4-A8217CAD115E</PlatformID> <OSVersion>4.20</OSVersion> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> | | > > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <RootNamespace>System.Data.SQLite</RootNamespace> <AssemblyName>System.Data.SQLite</AssemblyName> <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <PlatformFamilyName>PocketPC</PlatformFamilyName> <PlatformID>3C41C503-53EF-4c2a-8DD4-A8217CAD115E</PlatformID> <OSVersion>4.20</OSVersion> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <FormFactorID> </FormFactorID> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>System.Data.SQLite.CF.snk</AssemblyOriginatorKeyFile> <DeployDirSuffix>testce</DeployDirSuffix> <DeployDirPrefix>%25CSIDL_PROGRAM_FILES%25</DeployDirPrefix> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\CompactFramework\</OutputPath> <DefineConstants>TRACE;DEBUG;PocketPC;PLATFORM_COMPACTFRAMEWORK</DefineConstants> |
︙ | ︙ | |||
82 83 84 85 86 87 88 89 90 91 | <Compile Include="SQLiteFactory.cs" /> <Compile Include="SQLiteFunction.cs" /> <Compile Include="SQLiteFunctionAttribute.cs" /> <Compile Include="SQLiteParameter.cs" /> <Compile Include="SQLiteParameterCollection.cs" /> <Compile Include="SQLiteStatement.cs" /> <Compile Include="SQLiteTransaction.cs" /> <Compile Include="UnsafeNativeMethods.cs" /> </ItemGroup> <ItemGroup> | > > > > > > > > > > > > | > > > > > > | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | <Compile Include="SQLiteFactory.cs" /> <Compile Include="SQLiteFunction.cs" /> <Compile Include="SQLiteFunctionAttribute.cs" /> <Compile Include="SQLiteParameter.cs" /> <Compile Include="SQLiteParameterCollection.cs" /> <Compile Include="SQLiteStatement.cs" /> <Compile Include="SQLiteTransaction.cs" /> <Compile Include="SR.Designer.cs"> <DependentUpon>SR.resx</DependentUpon> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> </Compile> <Compile Include="UnsafeNativeMethods.cs" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="SR.resx"> <SubType>Designer</SubType> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>SR.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="System.Data.SQLite.snk" /> </ItemGroup> <ItemGroup> <None Include="DataTypes.xml" /> </ItemGroup> <ItemGroup> <None Include="MetaDataCollections.xml" /> </ItemGroup> <ItemGroup> <Folder Include="Properties\" /> </ItemGroup> <Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" /> <Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <ProjectExtensions> |
︙ | ︙ |
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
︙ | ︙ | |||
231 232 233 234 235 236 237 238 239 | 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); } } | > > > > > > | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | 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); [DllImport(SQLITE_DLL)] internal static extern int sqlite3_key_interop(int db, byte[] key, int keylen); [DllImport(SQLITE_DLL)] internal static extern int sqlite3_rekey_interop(int db, byte[] key, int keylen); } } |