From 4d1c69552adf536e1c087a656c4e8bfe2f552cd1 Mon Sep 17 00:00:00 2001 From: Brandon Toms Date: Fri, 19 Aug 2022 10:48:53 -0700 Subject: [PATCH] Changed the encrypt and decrypt variant from `.unsafe` to `.raw` in order to match that of the SecKey counterpart. --- Tests/CryptoSwiftTests/RSASecKeyTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/CryptoSwiftTests/RSASecKeyTests.swift b/Tests/CryptoSwiftTests/RSASecKeyTests.swift index 53dfcab..1bbd0fb 100644 --- a/Tests/CryptoSwiftTests/RSASecKeyTests.swift +++ b/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")