Just performs b64 encoding of stdin to stdout.
This commit is contained in:
parent
a91a0f808d
commit
0b61b577f5
1 changed files with 8 additions and 0 deletions
8
etc/b64.lua
Normal file
8
etc/b64.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
local base64 = socket.mime.base64.encode()
|
||||
local split = socket.mime.split()
|
||||
local convert = socket.mime.chain(base64, split)
|
||||
while 1 do
|
||||
local chunk = io.read(4096)
|
||||
io.write(convert(chunk))
|
||||
if not chunk then break end
|
||||
end
|
Loading…
Add table
Reference in a new issue