fix: replace openssl-based base64 with pure Lua implementation #28

Closed
opened 2026-05-25 19:25:05 +02:00 by michael · 1 comment
Owner

Problem

base64.lua uses openssl via io.popen and writes a temp file for
every encode/decode call. Base64 is a pure algorithm -- no external
dependency, no filesystem access needed.

Fix

Replace with a pure Lua implementation (~30 lines).
Removes: openssl dependency, io.open, io.popen, os.time temp files.

Also:

  • assert() must be replaced with nil, err (DAW standard)
  • Header path outdated: src/daw/lua/common/base64.lua

Impact

Faster, no dependencies, works without openssl installed.

## Problem `base64.lua` uses openssl via io.popen and writes a temp file for every encode/decode call. Base64 is a pure algorithm -- no external dependency, no filesystem access needed. ## Fix Replace with a pure Lua implementation (~30 lines). Removes: openssl dependency, io.open, io.popen, os.time temp files. Also: - assert() must be replaced with nil, err (DAW standard) - Header path outdated: src/daw/lua/common/base64.lua ## Impact Faster, no dependencies, works without openssl installed.
Author
Owner

b64url_encode/b64url_decode reimplemented on top of the pure-Lua b64_encode/b64_decode (issue #35) -- openssl dependency removed entirely. Verified byte-identical output against openssl base64 across ASCII, empty string, whitespace, and multi-byte UTF-8 samples. base64.lua is now genuinely zero-dependency, matching the README claim.

b64url_encode/b64url_decode reimplemented on top of the pure-Lua b64_encode/b64_decode (issue #35) -- openssl dependency removed entirely. Verified byte-identical output against openssl base64 across ASCII, empty string, whitespace, and multi-byte UTF-8 samples. base64.lua is now genuinely zero-dependency, matching the README claim.
michael 2026-07-19 17:55:16 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/daw-lua-common#28
No description provided.