remove use of Q in packing and unpacking

bug/bundler_fix
Rob Fuller 2014-06-23 16:52:53 -04:00
parent a7d00f8144
commit 8e37aea7c2
1 changed files with 5 additions and 3 deletions

View File

@ -66,10 +66,12 @@ puts hash.hexdigest
ret = rg.crypt32.CryptUnprotectData("#{len}#{addr}", 16, nil, nil, nil, 0, 8)
len, addr = ret["pDataOut"].unpack("V2")
else
addr = [mem].pack("Q")
len = [data.length].pack("Q")
addr = [mem & 0xffffffff, mem >> 32].pack("VV")
len = [data.length & 0xffffffff, data.length >> 32].pack("VV")
ret = rg.crypt32.CryptUnprotectData("#{len}#{addr}", 16, nil, nil, nil, 0, 16)
len, addr = ret["pDataOut"].unpack("Q2")
pData = ret["pDataOut"].unpack("VVVV")
len = pData[0] + (pData[1] << 32)
addr = pData[2] + (pData[3]) << 32)
end
return "" if len == 0