Lisplog

Blogging in Lisp

Search

Cryptographically-Secure Random Numbers in Elm

Submitted by Bill St. Clair on Fri, 24 Mar 2017 16:24:28 GMT

Elm contains a random number generator, and if you seed it well, it's not too bad, but JavaScript has a real cryptographically-secure random number generator, window.crypto.getRandomValue(). I built an interface to that.

It's in the Elm package repository at package.elm-lang.org/packages/elm-dev-random. There's a live example, which generates Diceware passphrases, at lisplog.org/diceware.

Add comment   Edit post   Add post

Previous Posts:

Elm Digital Ocean Interface
Fixed: Slow Macintosh File Dialogs
Kokuro Dojo for Android
Android Version Hell
Kakuro Dojo iOS App Ships!
Elm Tutorial on Commands, Subscriptions, and Ports
Kakuro-Dojo Is Good Enough to Play
SVG Rocks!
What Are You Listening To?
Wake 2011 iMac from Sleep