File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Tests/SQLiteTests/Extensions Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class CipherTests: XCTestCase {
19
19
20
20
// db2
21
21
let key2 = keyData ( )
22
- try db2. key ( Blob ( bytes : key2. bytes , length : key2 . length ) )
22
+ try db2. key ( Blob ( data : key2) )
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 ( bytes : newKey. bytes , length : newKey . length ) )
50
+ try db2. rekey ( Blob ( data : newKey) )
51
51
XCTAssertEqual ( 1 , try db2. scalar ( " SELECT count(*) FROM foo " ) as? Int64 )
52
52
}
53
53
@@ -108,12 +108,12 @@ class CipherTests: XCTestCase {
108
108
XCTAssertEqual ( 1 , try conn. scalar ( " SELECT count(*) FROM foo " ) as? Int64 )
109
109
}
110
110
111
- private func keyData( length: Int = 64 ) -> NSMutableData {
111
+ private func keyData( length: Int = 64 ) -> NSData {
112
112
let keyData = NSMutableData ( length: length) !
113
113
let result = SecRandomCopyBytes ( kSecRandomDefault, length,
114
114
keyData. mutableBytes. assumingMemoryBound ( to: UInt8 . self) )
115
115
XCTAssertEqual ( 0 , result)
116
- return keyData
116
+ return NSData ( data : keyData)
117
117
}
118
118
}
119
119
#endif
You can’t perform that action at this time.
0 commit comments