Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Simplify changes in the previous check-in. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5034d6b8f2b4cdd15e1ab3e4e12f911a |
User & Date: | mistachkin 2024-06-28 13:20:39 |
Context
2024-06-29
| ||
01:41 | Fix minor bug in a new method caused by a typo. check-in: 57d6cf2744 user: mistachkin tags: trunk | |
2024-06-28
| ||
13:20 | Simplify changes in the previous check-in. check-in: 5034d6b8f2 user: mistachkin tags: trunk | |
01:59 | Add the GetPasswordCallback property to the SQLiteConnection class. check-in: 5351cdbe2c user: mistachkin tags: trunk | |
Changes
Changes to System.Data.SQLite/SQLiteConnection.cs.
︙ | ︙ | |||
677 678 679 680 681 682 683 | /// <param name="passwordMode"> /// The called method may modify this parameter in order to change /// which connection string property is used to setup the password. /// </param> /// <returns> /// The password string to use when opening the connection. /// </returns> | | | 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 | /// <param name="passwordMode"> /// The called method may modify this parameter in order to change /// which connection string property is used to setup the password. /// </param> /// <returns> /// The password string to use when opening the connection. /// </returns> public delegate byte[] SQLiteGetPasswordCallback( SQLiteConnection connection, /* in */ ref PasswordMode passwordMode /* in, out */ ); #endif ///////////////////////////////////////////////////////////////////////////////////////////////// |
︙ | ︙ | |||
5248 5249 5250 5251 5252 5253 5254 | _sql.SetPassword(_password, _passwordWasText); } else if (_getPasswordCallback != null) { byte[] passwordBytes; PasswordMode passwordMode = PasswordMode.Password; | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 | _sql.SetPassword(_password, _passwordWasText); } else if (_getPasswordCallback != null) { byte[] passwordBytes; PasswordMode passwordMode = PasswordMode.Password; passwordBytes = _getPasswordCallback(this, ref passwordMode); switch (passwordMode) { case PasswordMode.None: { // // NOTE: Do nothing, ignore password. // break; } case PasswordMode.Password: { _sql.SetPassword(passwordBytes, false); _passwordWasText = false; _passwordWasHex = false; break; } case PasswordMode.HexPassword: { _sql.SetPassword(passwordBytes, false); _passwordWasText = false; _passwordWasHex = true; break; } case PasswordMode.TextPassword: { Array.Resize( ref passwordBytes, passwordBytes.Length + 1); _sql.SetPassword(passwordBytes, true); _passwordWasText = true; _passwordWasHex = false; break; } case PasswordMode.TextHexPassword: { Array.Resize( ref passwordBytes, passwordBytes.Length + 1); _sql.SetPassword(passwordBytes, true); _passwordWasText = true; _passwordWasHex = true; break; |
︙ | ︙ |