Add standard Base64 encode/decode alongside b64url #35
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type
bug
type
config
type
deployment
type
docs
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/daw-lua-common#35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add standard Base64 encode/decode (RFC 4648) to
daw-lua-common,alongside the existing
b64url_encode/b64url_decode.Context
base64.luacurrently only implements Base64url (for JWT). It shellsout to
openssl base64via a temp file written withio.open/io.popen.daw-modul-smtpneeds standard Base64 (with+,/,=padding) forSMTP AUTH LOGIN and MIME attachment encoding (RFC 2045 / RFC 5321).
Two reasons it currently uses its own in-module implementation instead
of
daw.common.base64:alphabet, no padding) -- using it for SMTP would produce invalid
output.
openssl-pipe approach means sensitive data (SMTPcredentials encoded for AUTH LOGIN) briefly touches disk. Fine for
JWT payloads, not desirable for passwords.
Acceptance Criteria
M.b64_encode(s)/M.b64_decode(s)added tobase64.lua,standard alphabet + padding, in-memory (no temp file, no
io.popen)b64url_encode/b64url_decodeunchangeddaw-modul-smtp's use cases (short strings for AUTH,binary attachment content)
Notes
Once available,
daw-modul-smtpwill drop its ownencode.luainfavor of
daw.common.base64.b64_encode/b64_decode.b64_encode/b64_decode added to base64.lua, RFC 4648, pure Lua (arithmetic only, no bit ops -- identical behavior on 5.1 and 5.4). Covered in test_base64.lua.