Skip to content

Commit

Permalink
if send enc_type is set to BC, always decode using BC
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Nov 11, 2024
1 parent c36c9c1 commit 869cd9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reolink_aio/baichuan/baichuan.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def _decrypt(self, data: bytes, len_header: int, enc_type: EncType = EncType.AES
header = data[0:len_header]

# decryption
if (len_header == 20 and rec_enc_type in ["01dd", "12dd"]) or (len_header == 24 and enc_type == EncType.BC):
if (len_header == 20 and rec_enc_type in ["01dd", "12dd"]) or enc_type == EncType.BC:
# Baichuan Encryption
rec_body = decrypt_baichuan(enc_body, rec_enc_offset)
elif (len_header == 20 and rec_enc_type in ["02dd", "03dd"]) or (len_header == 24 and enc_type == EncType.AES):
Expand Down

0 comments on commit 869cd9f

Please sign in to comment.