File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ class CryptorTests: XCTestCase {
38
38
( " test_Cryptor_DES_EBC_1 " , test_Cryptor_DES_EBC_1) ,
39
39
( " testMD2 " , testMD2) ,
40
40
( " testMD5_1 " , testMD5_1) ,
41
+ ( " test_Digest_MD5_NSData " , test_Digest_MD5_Data) ,
41
42
( " test_Digest_MD5_NSData " , test_Digest_MD5_NSData) ,
42
43
( " test_Digest_MD5_Composition_String " , test_Digest_MD5_Composition_String) ,
43
44
( " test_Digest_MD5_Composition_String_2 " , test_Digest_MD5_Composition_String_2) ,
@@ -378,6 +379,13 @@ class CryptorTests: XCTestCase {
378
379
XCTAssertEqual ( digest!, qbfMD5, " PASS " )
379
380
}
380
381
382
+ func test_Digest_MD5_Data( ) {
383
+ var qbfData : Data = CryptoUtils . data ( from: self . qbfBytes)
384
+ let digest = Digest ( using: . md5) . update ( data: & qbfData) ? . final ( )
385
+
386
+ XCTAssertEqual ( digest!, qbfMD5, " PASS " )
387
+ }
388
+
381
389
/// Test MD5 with string input and optional chaining.
382
390
func test_Digest_MD5_Composition_String( ) {
383
391
let digest = Digest ( using: . md5) . update ( string: qbfString) ? . final ( )
You can’t perform that action at this time.
0 commit comments