You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(!isSecureContext)thrownewAiScriptRuntimeError(`The random algorithm ${algo} cannot be used because \`crypto.subtle\` is not available. Maybe in non-secure context?`);
476
478
returnGenerateRC4Random(seed);
477
-
case'chacha20':
479
+
}
480
+
case'chacha20': {
481
+
if(!isSecureContext)thrownewAiScriptRuntimeError(`The random algorithm ${algo} cannot be used because \`crypto.subtle\` is not available. Maybe in non-secure context?`);
478
482
returnawaitGenerateChaCha20Random(seed);
483
+
}
479
484
default:
480
485
thrownewAiScriptRuntimeError('`options.algorithm` must be one of these: `chacha20`, `rc4`, or `rc4_legacy`.');
0 commit comments