Imported Upstream version 5.14.0.78

Former-commit-id: 3494343bcc9ddb42b36b82dd9ae7b69e85e0229f
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-05-10 08:37:03 +00:00
parent 74b74abd9f
commit 19234507ba
1776 changed files with 67755 additions and 31107 deletions

View File

@@ -929,29 +929,25 @@ namespace Mono.Data.Sqlite
return UnsafeNativeMethods.sqlite3_aggregate_context(context, 1);
}
#if MONOTOUCH
internal override void SetPassword(byte[] passwordBytes)
{
throw new NotImplementedException ();
}
internal override void ChangePassword(byte[] newPasswordBytes)
{
throw new NotImplementedException ();
}
#else
internal override void SetPassword(byte[] passwordBytes)
{
#if MOBILE
throw new PlatformNotSupportedException();
#else
int n = UnsafeNativeMethods.sqlite3_key(_sql, passwordBytes, passwordBytes.Length);
if (n > 0) throw new SqliteException(n, SQLiteLastError());
#endif
}
internal override void ChangePassword(byte[] newPasswordBytes)
{
#if MOBILE
throw new PlatformNotSupportedException();
#else
int n = UnsafeNativeMethods.sqlite3_rekey(_sql, newPasswordBytes, (newPasswordBytes == null) ? 0 : newPasswordBytes.Length);
if (n > 0) throw new SqliteException(n, SQLiteLastError());
}
#endif
}
#if MONOTOUCH
SQLiteUpdateCallback update_callback;