dimanche 3 janvier 2016

Cryptographically secure float

How do you generate cryptographically secure floats in Javascript?

This should be a plug-in for Math.random, with range (0, 1), but cryptographically secure. Example usage

cryptoFloat.random();
0.8083966837153522

Secure random numbers in javascript? shows how to create a cryptographically secure Uint32Array. Maybe this could be converted to a float somehow?




Aucun commentaire:

Enregistrer un commentaire