Skip to content

Commit

Permalink
encrypt error
Browse files Browse the repository at this point in the history
  • Loading branch information
sbd021 committed Aug 14, 2020
1 parent e257831 commit 4a68336
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ void CEnterChannelDlg::OnBnClickedBtnjoinChannel()
// configuration of encrypt
EncryptionConfig config;
// set encrypt mode
config.encryptionMode = m_cmbEncType.GetCurSel();
config.encryptionMode = ENCRYPTION_MODE(m_cmbEncType.GetCurSel() + 1);
// set encrypt key
config.encryptionKey = strKey;
char szKey[520] = { 0 };
WideCharToMultiByte(CP_UTF8, 0, strKey.GetBuffer(0), strKey.GetLength(), szKey, 520, NULL, NULL);
config.encryptionKey = szKey;
// EnableEncryption of engine.
CAgoraObject::GetAgoraObject()->EnableEncryption(true, config);
}
Expand Down

0 comments on commit 4a68336

Please sign in to comment.