浏览代码

Changed the encrypt and decrypt variant from `.unsafe` to `.raw` in order to match that of the SecKey counterpart.

Brandon Toms 3 年之前
父节点
当前提交
4d1c69552a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Tests/CryptoSwiftTests/RSASecKeyTests.swift

+ 2 - 2
Tests/CryptoSwiftTests/RSASecKeyTests.swift

@@ -229,10 +229,10 @@
         // Encrypt with SecKey
         let skEncryption = try secKeyEncrypt(messageToSign.bytes, usingVariant: .rsaEncryptionRaw, withKey: rsaSecKey)
         // Decrypt with CryptoSwift Key
-        XCTAssertEqual(try rsaCryptoSwift.decrypt(skEncryption.bytes, variant: .unsafe), messageToSign.bytes, "CryptoSwift Decryption of SecKey Encryption Failed")
+        XCTAssertEqual(try rsaCryptoSwift.decrypt(skEncryption.bytes, variant: .raw), messageToSign.bytes, "CryptoSwift Decryption of SecKey Encryption Failed")
 
         // Encrypt with CryptoSwift
-        let csEncryption = try rsaCryptoSwift.encrypt(messageToSign.bytes, variant: .unsafe)
+        let csEncryption = try rsaCryptoSwift.encrypt(messageToSign.bytes, variant: .raw)
         // Decrypt with SecKey
         XCTAssertEqual(try self.secKeyDecrypt(csEncryption, usingVariant: .rsaEncryptionRaw, withKey: rsaSecKey).bytes, messageToSign.bytes, "SecKey Decryption of CryptoSwift Encryption Failed")