I'm trying to convert a Ruby script into a Python script (having absolutely no understanding of the various functions in Ruby) and can't find anything on the Ruby sub function.
Here's the function I'm trying to translate:
def getCCache(arg1, arg2, arg3)
local4 = Digest::MD5.hexdigest(arg1 + arg2)
local5 = 0
while (local5 < arg3.length)
temp1 = arg3[local5]
temp2 = local5
local5 += local5;
local4.sub(temp1, arg3[temp2])
local5 += 1
end
return (local4)
end
The line I'm having trouble with is local4.sub(temp1, arg3[temp2]). What does the sub function do? If there's an equivalent in Python I would appreciate that as well.
arg,tempandlocal- in fact it looks like it has been deliberately obfuscated?Digest::MD5.hexdigest(arg1 + arg2).