Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _hy_anon_fn_3():
key_bytes = bytearray(hashlib.md5(self.key).hexdigest(), u'utf-8')
ret_val = list(range(256L))
k = 0L
m = 0L
for i in range(256L):
k = (255L & ((k + key_bytes[m]) + ret_val[i]))
[ret_val[i], ret_val[k]] = [ret_val[k], ret_val[i]]
[ret_val[i], ret_val[k]]
m = ((1L + m) % len(key_bytes))
return ret_val
return _hy_anon_fn_3()
def _hy_anon_fn_3():
key_bytes = bytearray(hashlib.md5(self.key).hexdigest(), u'utf-8')
ret_val = list(range(256L))
k = 0L
m = 0L
for i in range(256L):
k = (255L & ((k + key_bytes[m]) + ret_val[i]))
[ret_val[i], ret_val[k]] = [ret_val[k], ret_val[i]]
[ret_val[i], ret_val[k]]
m = ((1L + m) % len(key_bytes))
return ret_val
return _hy_anon_fn_3()
def _hy_anon_fn_5():
trans_table = self._make_translate_table()
raw_bytes = bytearray(raw)
ret_val = bytearray(len(raw_bytes))
j = 0L
k = 0L
for i in range(len(raw_bytes)):
k = (255L & (k + 1L))
j = (255L & (j + trans_table[k]))
[trans_table[j], trans_table[k]] = [trans_table[k], trans_table[j]]
[trans_table[j], trans_table[k]]
n = (255L & (trans_table[k] + trans_table[j]))
ret_val[i] = (raw_bytes[i] ^ trans_table[n])
ret_val[i]
return str(ret_val)
return _hy_anon_fn_5()