]> git.ardis.lu - envpass/commit
Pass PRF as raw bytes instead of string
authorArdis Lu <ardisglu@gmail.com>
Mon, 25 May 2026 00:21:14 +0000 (17:21 -0700)
committerArdis Lu <ardisglu@gmail.com>
Mon, 25 May 2026 00:21:14 +0000 (17:21 -0700)
commit989ca71ecd3413e43bfdcd685a163f3123a83f9a
tree10e6d870eb8837778f35cc91274e2c52fe76de00
parent31b1c0609734309cc65bd9b225ade55407452062
Pass PRF as raw bytes instead of string

Avoiding string serialization is more performant and simpler, and more importantly reduces the places where this sensitive value is written to memory. By keeping the value in buffer we can immediately zero it out manually instead of waiting for garbage collection.

The value is still "leaked" via DevTools inspection and other points in the network stack, but that is out of the control of JS.
src/getPrf.html
src/getPrf.js
src/utils.js
test/getPrf.test.js
test/utils.test.js
This page took 0.044185 seconds and 4 git commands to generate.