← Back to all sparks
S

secretbase

DEVOPS
Velocity0.0

Cryptographic Hash Functions and Data Encoding

secretbase quietly grew from a hashing package into a serialization toolkit

hashingrserializationcborencodingdependency-free
Current state
secretbase provides SHA-3, SHAKE, BLAKE3 and related hashing in R with a small C footprint and no dependencies. Over 2026 it has accumulated a second identity: CBOR, base58, JSON and URL-safe base64 encoders and decoders now sit alongside the hash functions. Releases are frequent, short and each does one thing — a format added, a conversion sped up, an undefined-behaviour warning cleared.
Where it's heading
The additions are not arbitrary. CBOR is a binary format for structured data, JSON its text counterpart, base58 the checksummed encoding used for identifiers — together they cover what a process needs to put an R object on a wire and get it back, which is a different job from digesting bytes. The maintainer also maintains R's high-performance messaging stack, and a dependency-free codec that handles integers, floats, strings, raw vectors and lists is exactly what that stack would consume.
Prediction
Every format added so far has come with an RFC number and a minimal implementation rather than a wrapped library, so further additions are likely to follow the same pattern; the encoders are also being optimized after they land, suggesting performance passes on CBOR and JSON before anything new.

Recent moves

  1. 2mo ago

    secretbase 1.3.0

    base64enc() and base64dec() gain a url argument for the RFC 4648 section 5 variant — the - and _ alphabet without padding. Small, but it is the encoding required anywhere base64 output lands in a URL path or filename, which the standard alphabet cannot safely do.

    View source ↗
  2. 3mo ago

    secretbase 1.2.2

    Faster hex conversion for hash output and UTF-8 tagging on jsondec() strings per RFC 8259. Follow-up polish on the formats added earlier in the year.

    View source ↗
  3. 4mo ago

    secretbase 1.2.1

    Undefined behaviour fixed as flagged by GCC 16. Compilation hygiene, no user-visible effect.

    View source ↗
  4. 6mo ago

    secretbase 1.2.0

    jsonenc() and jsondec() arrive as a minimal JSON implementation, giving the package a text counterpart to the CBOR support added the month before. Another dependency-free codec rather than a wrapper.

    View source ↗
  5. 7mo ago

    secretbase 1.1.1

    CBOR performance work plus a semantic fix — scalar values carrying attributes now encode as scalars rather than arrays. A correctness detail that matters for anything reading the output in another language.

    View source ↗
  6. 7mo ago

    secretbase 1.1.0 adds CBOR, turning a hash package into a codec

    ⚡ SPARK

    The release that changes what secretbase is for. CBOR encoding handles structured R data — integers, floats, strings, raw vectors, lists — which is a different job from digesting bytes, and everything added since has extended that second role rather than the hashing one.

    View source ↗