start with this code. Just set the system and secure RNGs to f, and
calling them will throw an error. The Mersenne Twister is still the
default anyway.
handle>> swap [ ] [ <byte-array> ] bi
[ CryptGenRandom win32-error=0/f ] keep ;
-: try-crypto-providers ( seq -- windows-crypto-context )
- [ first2 <windows-crypto-context> ] attempt-all ;
+! Some Windows installations still don't work, so just set
+! system and secure rngs to f
+: try-crypto-providers ( seq -- windows-crypto-context/f )
+ [
+ [ first2 <windows-crypto-context> ] attempt-all
+ ] [ 2drop f ] recover ;
[
{