Return if the RC4 is 0

This commit is contained in:
polaris
2014-05-31 14:41:07 -04:00
parent 441c17ed94
commit 2f25dab9b7

View File

@@ -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)