mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 04:09:01 +00:00
Merge documetation for unpwdb, url, bit, tab, base64, and bin.
This commit is contained in:
@@ -95,9 +95,9 @@ local bunpack = bin.unpack
|
||||
local concat = table.concat
|
||||
|
||||
---
|
||||
-- Encode six bits to a base64 encoded character
|
||||
--@param bits String of six bits to be encoded
|
||||
--@return Encoded character
|
||||
-- Encode six bits to a base64 encoded character.
|
||||
--@param bits String of six bits to be encoded.
|
||||
--@return Encoded character.
|
||||
local function b64enc6bit(bits)
|
||||
-- local byte
|
||||
-- local _, byte = bunpack("C", bpack("B", "00" .. bits))
|
||||
@@ -110,9 +110,9 @@ end
|
||||
|
||||
|
||||
---
|
||||
-- Decodes a base64 encoded character into binary digits
|
||||
--@param b64byte Single base64 encoded character
|
||||
--@return String of six decoded bits
|
||||
-- Decodes a base64 encoded character into binary digits.
|
||||
--@param b64byte Single base64 encoded character.
|
||||
--@return String of six decoded bits.
|
||||
local function b64dec6bit(b64byte)
|
||||
local bits = b64dctable[b64byte]
|
||||
if bits then return bits end
|
||||
@@ -121,9 +121,9 @@ end
|
||||
|
||||
|
||||
---
|
||||
-- Encodes a string to base64
|
||||
--@param bdata Data to be encoded
|
||||
--@return Base64 encoded string
|
||||
-- Encodes a string to base64.
|
||||
--@param bdata Data to be encoded.
|
||||
--@return Base64 encoded string.
|
||||
function enc(bdata)
|
||||
local pos = 1
|
||||
local byte
|
||||
@@ -152,9 +152,9 @@ end
|
||||
|
||||
|
||||
---
|
||||
-- Decodes base64 encoded data
|
||||
--@param b64data Base64 encoded data
|
||||
--@return Decoded data
|
||||
-- Decodes base64 encoded data.
|
||||
--@param b64data Base64 encoded data.
|
||||
--@return Decoded data.
|
||||
function dec(b64data)
|
||||
local bdataBuf = {}
|
||||
local pos = 1
|
||||
|
||||
Reference in New Issue
Block a user