mirror of
https://github.com/barronwaffles/dwc_network_server_emulator.git
synced 2026-08-23 19:15:09 -05:00
Return if the RC4 is 0
This commit is contained in:
@@ -31,6 +31,10 @@ def rc4_encrypt(_key, _data):
|
||||
key = bytearray(_key)
|
||||
data = bytearray(_data)
|
||||
|
||||
if len(key) == 0:
|
||||
# This shouldn't happen but it apparently can on a rare occasion. key should always be set.
|
||||
return
|
||||
|
||||
# Key-scheduling algorithm
|
||||
S = range(0x100)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user