@@ -19,7 +19,7 @@ class CipherTests: XCTestCase {
19
19
20
20
// db2
21
21
let key2 = keyData ( )
22
- try db2. key ( Blob ( data : key2) )
22
+ try db2. key ( Blob ( bytes : key2. bytes , length : key2 . length ) )
23
23
24
24
try db2. run ( " CREATE TABLE foo (bar TEXT) " )
25
25
try db2. run ( " INSERT INTO foo (bar) VALUES ('world') " )
@@ -47,7 +47,7 @@ class CipherTests: XCTestCase {
47
47
48
48
func test_data_rekey( ) throws {
49
49
let newKey = keyData ( )
50
- try db2. rekey ( Blob ( data : newKey) )
50
+ try db2. rekey ( Blob ( bytes : newKey. bytes , length : newKey . length ) )
51
51
XCTAssertEqual ( 1 , try db2. scalar ( " SELECT count(*) FROM foo " ) as? Int64 )
52
52
}
53
53
@@ -79,12 +79,11 @@ class CipherTests: XCTestCase {
79
79
// sqlite> CREATE TABLE foo (bar TEXT);
80
80
// sqlite> INSERT INTO foo (bar) VALUES ('world');
81
81
guard let cipherVersion: String = db1. cipherVersion,
82
- cipherVersion. starts ( with: " 3. " ) || cipherVersion. starts ( with: " 4. " )
83
- else { return }
82
+ cipherVersion. starts ( with: " 3. " ) || cipherVersion. starts ( with: " 4. " ) else { return }
84
83
85
84
let encryptedFile = cipherVersion. starts ( with: " 3. " ) ?
86
- fixture ( " encrypted-3.x " , withExtension: " sqlite " ) :
87
- fixture ( " encrypted-4.x " , withExtension: " sqlite " )
85
+ fixture ( " encrypted-3.x " , withExtension: " sqlite " ) :
86
+ fixture ( " encrypted-4.x " , withExtension: " sqlite " )
88
87
89
88
try FileManager . default. setAttributes ( [ FileAttributeKey . immutable: 1 ] , ofItemAtPath: encryptedFile)
90
89
XCTAssertFalse ( FileManager . default. isWritableFile ( atPath: encryptedFile) )
0 commit comments