Javascript entropy generator for random functions