Skip to content

Commit 7ae942b

Browse files
committed
Rename SetReKey to ReKey
1 parent 8d28c7c commit 7ae942b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/SQLite.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ void SetKey (byte[] key)
491491
/// Change the encryption key for a SQLCipher database with "pragma rekey = ...".
492492
/// </summary>
493493
/// <param name="key">Encryption key plain text that is converted to the real encryption key using PBKDF2 key derivation</param>
494-
public void SetReKey (string key)
494+
public void ReKey (string key)
495495
{
496496
if (key == null)
497497
throw new ArgumentNullException(nameof(key));
@@ -503,7 +503,7 @@ public void SetReKey (string key)
503503
/// Change the encryption key for a SQLCipher database.
504504
/// </summary>
505505
/// <param name="key">256-bit (32 byte) or 384-bit (48 bytes) encryption key data</param>
506-
public void SetReKey (byte[] key)
506+
public void ReKey (byte[] key)
507507
{
508508
if (key == null)
509509
throw new ArgumentNullException(nameof(key));

tests/SQLite.Tests/SQLCipherTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public void ResetStringKey ()
158158
var reKey = "SecretKey";
159159

160160
using (var db = new TestDb (key: key)) {
161-
db.SetReKey (reKey);
161+
db.ReKey (reKey);
162162
path = db.DatabasePath;
163163

164164
db.CreateTable<TestTable> ();
@@ -184,7 +184,7 @@ public void ResetByteKey ()
184184
rand.NextBytes (reKey);
185185

186186
using (var db = new TestDb (key: key)) {
187-
db.SetReKey (reKey);
187+
db.ReKey (reKey);
188188
path = db.DatabasePath;
189189

190190
db.CreateTable<TestTable> ();
@@ -206,7 +206,7 @@ public void ResetBadKey ()
206206
try
207207
{
208208
using (var db = new TestDb ()) {
209-
db.SetReKey (key);
209+
db.ReKey (key);
210210
}
211211

212212
Assert.Fail ("Should have thrown");

0 commit comments

Comments
 (0)