Skip to content

crypto: add randomFill and randomFillSync

Rodrigo Muino Tomonari requested to merge github/fork/evanlucas/cryptobuf into master
Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

crypto

Description of change

crypto.randomFill and crypto.randomFillSync are similar to crypto.randomBytes, but allow passing in a buffer as the first argument. This allows us to reuse buffers to prevent having to create a new one on every call.

Merge request reports

Loading