Skip to content

Commit f8c26a0

Browse files
frednjira005praeclarum
authored andcommitted
Support the raw key data with explicit salt.
1 parent 47957c5 commit f8c26a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SQLite.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ void SetKey (byte[] key)
384384
{
385385
if (key == null)
386386
throw new ArgumentNullException (nameof (key));
387-
if (key.Length != 32)
388-
throw new ArgumentException ("Key must be 32 bytes (256-bit)", nameof (key));
387+
if (key.Length != 32 && key.Length != 48)
388+
throw new ArgumentException ("Key must be 32 bytes (256-bit) or 48 bytes (384-bit)", nameof (key));
389389
var s = String.Join ("", key.Select (x => x.ToString ("X2")));
390390
ExecuteScalar<string> ("pragma key = \"x'" + s + "'\"");
391391
}

0 commit comments

Comments
 (0)