diff --git a/ios/OX Coi/Extensions/UIKit/AppDelegate+Security.swift b/ios/OX Coi/Extensions/UIKit/AppDelegate+Security.swift index 01303750..80aa43dc 100644 --- a/ios/OX Coi/Extensions/UIKit/AppDelegate+Security.swift +++ b/ios/OX Coi/Extensions/UIKit/AppDelegate+Security.swift @@ -54,8 +54,14 @@ extension AppDelegate { switch call.method { case MethodChannel.Security.Method.Decrypt: if let messageDict = call.arguments as? [String: String] { - let securityHelper = SecurityHelper(message: messageDict) - result(securityHelper.decryptedMessage) +// do { +// let securityHelper = try SecurityHelper(message: messageDict) +// let decryptedMessage = try securityHelper.getDecryptedMessage() +// result(decryptedMessage) +// +// } catch { +// throw SecurityHelperError.decryptMessageFailed(error: error.localizedDescription) +// } return } diff --git a/ios/OX Coi/Helper/SecurityHelper.swift b/ios/OX Coi/Helper/SecurityHelper.swift index 7fcec17a..2febf623 100644 --- a/ios/OX Coi/Helper/SecurityHelper.swift +++ b/ios/OX Coi/Helper/SecurityHelper.swift @@ -147,5 +147,6 @@ enum SecurityHelperError: Error { case authSecretGenerationFailed(error: String) case privateKeyGenerationFailed(error: String) case publicKeyGenerationFailed(error: String) + case decryptMessageFailed(error: String) }