Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
SecurityHelper additions
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Gregor committed Jun 5, 2020
1 parent f2faeaa commit 3c8897b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ios/OX Coi/Extensions/UIKit/AppDelegate+Security.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
1 change: 1 addition & 0 deletions ios/OX Coi/Helper/SecurityHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,6 @@ enum SecurityHelperError: Error {
case authSecretGenerationFailed(error: String)
case privateKeyGenerationFailed(error: String)
case publicKeyGenerationFailed(error: String)
case decryptMessageFailed(error: String)
}

0 comments on commit 3c8897b

Please sign in to comment.