Skip to content

Commit 69584f9

Browse files
Merge pull request from dev to main for release 2.2.3
merge from dev to main for release2.2.3
2 parents d6c3a17 + 5be8227 commit 69584f9

File tree

7 files changed

+28
-5
lines changed

7 files changed

+28
-5
lines changed

README.cn.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
3838

3939
# 更新日志
4040
## todo:
41+
## 2025.04.14 发布 2.2.3
42+
-- Fix:
43+
-- 修复了enable_encryption 在salt 处理中的一个bug
44+
-- 更新在enable_encryption 中的逻辑,当enable为0的时候,不做处理
4145
## 2025.04.10 发布 2.2.2
4246
-- Add:
4347
- push_video_encoded_file.py: 支持推送mp4文件;支持推送h264编码的h.264文件;其中里面有从mp4文件的avformat转换为raw 264流的annex B格式的转换。

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
3535
```
3636

3737
# Change log
38+
39+
## 2025.04.14 Release 2.2.3
40+
-- Fix:
41+
-- Fixed a bug in the salt processing in enable_encryption
42+
-- Updated the logic in enable_encryption, no processing when enable is 0
3843
2025.04.10 Release 2.2.2
3944
-- Additions:
4045
- Added push_video_encoded_file.py to support pushing mp4 files and h264 encoded h.264 files. Includes conversion from mp4 file avformat to raw 264 stream in annex B format.

agora_rtc/README.cn.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
3737
```
3838

3939
# 更新日志
40+
## 2025.04.14 发布 2.2.3
41+
-- Fix:
42+
-- 修复了enable_encryption 在salt 处理中的一个bug
43+
-- 更新在enable_encryption 中的逻辑,当enable为0的时候,不做处理
4044
## 2025.04.10 发布 2.2.2
4145
-- Add:
4246
- push_video_encoded_file.py: 支持推送mp4文件;支持推送h264编码的h.264文件;其中里面有从mp4文件的avformat转换为raw 264流的annex B格式的转换。

agora_rtc/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
3535
```
3636

3737
# Change log
38+
## 2025.04.14 Release 2.2.3
39+
-- Fix:
40+
-- Fixed a bug in the salt processing in enable_encryption
41+
-- Updated the logic in enable_encryption, no processing when enable is 0
3842
2025.04.10 Release 2.2.2
3943
-- Additions:
4044
- Added push_video_encoded_file.py to support pushing mp4 files and h264 encoded h.264 files. Includes conversion from mp4 file avformat to raw 264 stream in annex B format.

agora_rtc/agora/rtc/_ctypes_handle/_ctypes_data.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,10 +1234,13 @@ def create(config: EncryptionConfig) -> 'EncryptionConfigInner':
12341234
if length > 32:
12351235
length = 32
12361236
#change bytearray to uint8 * length
1237-
if length > 0:
1238-
encryption_kdf_salt = (ctypes.c_uint8 * length)(*config.encryption_kdf_salt)
1239-
else:
1240-
encryption_kdf_salt = (ctypes.c_uint8 * 32)() # 32 bytes,empty array
1237+
encryption_kdf_salt = (ctypes.c_uint8 * 32)() # 32 bytes,empty array
1238+
# get min length of config.encryption_kdf_salt and 32
1239+
min_length = min(length, 32)
1240+
#copy config.encryption_kdf_salt to encryption_kdf_salt
1241+
for i in range(min_length):
1242+
encryption_kdf_salt[i] = config.encryption_kdf_salt[i]
1243+
12411244
# change encryption_key to c_char_p
12421245
encryption_key = config.encryption_key.encode('utf-8') if config.encryption_key else None
12431246
#change None to c_char_p

agora_rtc/agora/rtc/rtc_connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ def enable_encryption(self, enabled: int, config: EncryptionConfig) -> int:
149149
Note:
150150
This method must be called before self.connect()
151151
"""
152+
if enabled == 0:
153+
return 0
154+
152155
inner_config = EncryptionConfigInner.create(config)
153156
return agora_rtc_conn_enable_encryption(self.conn_handle, enabled, ctypes.byref(inner_config))
154157

agora_rtc/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def download_and_extract_sdk(self):
5858

5959
setup(
6060
name='agora_python_server_sdk',
61-
version='2.2.2',
61+
version='2.2.3',
6262
description='A Python SDK for Agora Server',
6363
long_description=open('README.md').read(),
6464
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)