1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00

Support for Cloudflare Workers for javascript_stir (#1401)

* Support for Cloudflare Workers for javascript_stir

* Ramove debugging comment

---------

Co-authored-by: Frank Denis <124872+jedisct1@users.noreply.github.com>
This commit is contained in:
mschwarzl 2024-08-13 21:40:10 +02:00 committed by Frank Denis
parent 445dc37c16
commit b7b1c08272

View File

@ -89,6 +89,7 @@ randombytes_stir(void)
try {
var window_ = 'object' === typeof window ? window : self;
var crypto_ = typeof window_.crypto !== 'undefined' ? window_.crypto : window_.msCrypto;
crypto_ = (crypto_ === undefined) ? crypto : crypto_;
var randomValuesStandard = function() {
var buf = new Uint32Array(1);
crypto_.getRandomValues(buf);