Skip to content

Commit 40db4d2

Browse files
author
qinhui
committed
Fix the bug that encrypted videos do not interoperate between iOS and Android.
1 parent 86cb4c2 commit 40db4d2

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

iOS/APIExample/APIExample/Common/AgoraExtension.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ extension AgoraAudioScenario {
107107
extension AgoraEncryptionMode {
108108
func description() -> String {
109109
switch self {
110-
case .AES128GCM2: return "AES128GCM"
111-
case .AES256GCM2: return "AES256GCM"
110+
case .AES128GCM: return "AES128GCM"
111+
case .AES256GCM: return "AES256GCM"
112112
default:
113113
return "\(self.rawValue)"
114114
}
115115
}
116116

117117
static func allValues() -> [AgoraEncryptionMode] {
118-
return [.AES128GCM2, .AES256GCM2]
118+
return [.AES128GCM, .AES256GCM]
119119
}
120120
}
121121

iOS/APIExample/APIExample/Examples/Advanced/StreamEncryption/StreamEncryption.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class StreamEncryptionEntry: UIViewController {
1414
@IBOutlet weak var channelTextField: UITextField!
1515
@IBOutlet weak var encryptSecretField: UITextField!
1616
@IBOutlet weak var encryptModeBtn: UIButton!
17-
var mode: AgoraEncryptionMode = .AES128GCM2
17+
var mode: AgoraEncryptionMode = .AES128GCM
1818
var useCustom: Bool = false
1919
let identifier = "StreamEncryption"
2020

macOS/APIExample/Common/AgoraExtension.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ extension AgoraAudioScenario {
151151
extension AgoraEncryptionMode {
152152
func description() -> String {
153153
switch self {
154-
case .AES128GCM2: return "AES128GCM"
155-
case .AES256GCM2: return "AES256GCM"
154+
case .AES128GCM: return "AES128GCM"
155+
case .AES256GCM: return "AES256GCM"
156156
default:
157157
return "\(self.rawValue)"
158158
}
159159
}
160160

161161
static func allValues() -> [AgoraEncryptionMode] {
162-
return [.AES128GCM2, .AES256GCM2]
162+
return [.AES128GCM, .AES256GCM]
163163
}
164164
}
165165

macOS/APIExample/Examples/Advanced/StreamEncryption/StreamEncryption.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ class StreamEncryption: BaseViewController {
240240
config.encryptionMode = selectedEncrption!
241241
config.encryptionKey = encryptionSecretField.stringValue
242242
config.encryptionKdfSalt = getEncryptionSaltFromServer()
243+
243244
let ret = agoraKit.enableEncryption(true, encryptionConfig: config)
244245
if ret != 0 {
245246
// for errors please take a look at:

0 commit comments

Comments
 (0)