refactor(encoding): make hexEncoded, hexDecoded and base64Decoded methods #184
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/176-encoding-methods"
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?
$Makes hexadecimal and Base64 decoding methods, slice of #146.\n\n-
std/encodingdeclaresBytes.hexEncoded(uppercase:),String.hexDecoded()andString.base64Decoded()insrc/lib.trb(extension members must be declared where they are imported from; see #182). The free functions are removed, no wrappers, no deprecation (owner decision on #146, scope update on #176).\n- Every caller migrated:std/yaml,std/dns,std/digesttest,tools/registryand its test, the encoding tests,docs/standard-library/encoding.mdandskills/.\n- The helpers behind them are nowhexOf,bytesOfHex,bytesOfBase64, module-internal.\n\nNo seed impact: ordinary TorbScript instd/.\n\n## Test\nNo local build (CI only). Forge CI runs gates a.\n\nCloses #176250b0339f4f5fc8a22cff5fc8a22cf50e3cd363cChecklist for
50e3cd3(CIgatesand all required jobs green on this head):std/encodingbase64 and hexadecimal tests migrated to the method form (same vectors and error cases); every caller's test (std/digestpbkdf2,tools/registrytrusted-publishing) and the doctrb checkblocks run in CI.hexOf,bytesOfHex,bytesOfBase64(bodies unchanged apart from the name). A repo-wide grep finds no remaining call of the removed free functions.encoding.mdand the skill copy updated in sync, FIRST-PARTY row 7 updated, pdisc green.std/encodingchanges shape only (functions to extension members), as intended.Non-blocking:
$and contains literal\nsequences, so the list renders as one line; the "Test" section could name the gates that ran.use List.hexEncodedwhile the declaration isextend Bytes; fine ifBytesisList<UInt8>for member lookup (CI proves it works), but a one-line note in encoding.md would spare readers the question.