mirror of
https://github.com/nmap/nmap.git
synced 2026-01-01 12:29:03 +00:00
Remove trailing whitespace in lua files
Whitespace is not significant, so this should not be a problem. https://secwiki.org/w/Nmap/Code_Standards
This commit is contained in:
@@ -22,10 +22,10 @@ local b64table = {
|
||||
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
|
||||
'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
||||
'w', 'x', 'y', 'z', '0', '1', '2', '3',
|
||||
'w', 'x', 'y', 'z', '0', '1', '2', '3',
|
||||
'4', '5', '6', '7', '8', '9', '+', '/'
|
||||
}
|
||||
|
||||
|
||||
local b64dctable = {} -- efficency
|
||||
b64dctable['A'] = '000000'
|
||||
b64dctable['B'] = '000001'
|
||||
@@ -95,7 +95,7 @@ b64dctable['/'] = '111111'
|
||||
|
||||
local append = table.insert
|
||||
local substr = string.sub
|
||||
local bpack = bin.pack
|
||||
local bpack = bin.pack
|
||||
local bunpack = bin.unpack
|
||||
local concat = table.concat
|
||||
|
||||
@@ -107,7 +107,7 @@ local function b64enc6bit(bits)
|
||||
-- local byte
|
||||
-- local _, byte = bunpack("C", bpack("B", "00" .. bits))
|
||||
--
|
||||
|
||||
|
||||
-- more efficient, does the same (nb: add one to byte moved up one line):
|
||||
local byte = tonumber(bits, 2) + 1
|
||||
return b64table[byte]
|
||||
@@ -146,7 +146,7 @@ function enc(bdata)
|
||||
end
|
||||
end
|
||||
if #nbyte == 2 then
|
||||
append(b64dataBuf, b64enc6bit(nbyte .. "0000") )
|
||||
append(b64dataBuf, b64enc6bit(nbyte .. "0000") )
|
||||
append(b64dataBuf, "==")
|
||||
elseif #nbyte == 4 then
|
||||
append(b64dataBuf, b64enc6bit(nbyte .. "00"))
|
||||
|
||||
Reference in New Issue
Block a user