Commit 3d882457
3d882457de02Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 5 files · +4 added · ~1 modified
Description
Merge pull request #514 from OriPekelman/add-sp-crypto
Add sp_crypto.{c,h} -- compact SHA-256 / HMAC / PBKDF2 / B64URL / CSPRNG
Resolved against master changes (cls_ivar_nil_checked from #497, sp_re_rindex and string-runtime tweaks from #504/#505/#510/#511). Merge commit is clean; only sp_crypto.{c,h} and the test fixture land. CSPRNG path on Windows MinGW was extended in 417fb08 to use BCryptGenRandom via runtime LoadLibrary -- the PR's original fallback returned identical bytes across calls within the same second and tripped the test's "two random outputs must differ" invariant on the windows-mingw CI job.
Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]
Details
- Commit
- 3d882457de02
- Parent
- f968c231f600
- Merge parent
- bbd20e3e498d
MakefilemodifiedView file
@mkdir -p build $(CC) -c -O2 -Wno-all $(SEC_FLAGS) -Ilib lib/sp_bigint.c -o build/sp_bigint.obuild/sp_crypto.o: lib/sp_crypto.c lib/sp_crypto.h @mkdir -p build $(CC) -c -O2 -Wno-all $(SEC_FLAGS) -Ilib lib/sp_crypto.c -o build/sp_crypto.oSP_RT_LIB = lib/libspinel_rt.a$(SP_RT_LIB): $(RE_OBJ) build/sp_bigint.o$(SP_RT_LIB): $(RE_OBJ) build/sp_bigint.o build/sp_crypto.o ar rcs $@ $^regexp: $(SP_RT_LIB)lib/sp_crypto.caddedView file
Loading diff…
lib/sp_crypto.haddedView file
Loading diff…
test/sp_crypto_basic.rbaddedView file
Loading diff…
test/sp_crypto_basic.rb.expectedaddedView file
Loading diff…