dimanche 5 juillet 2020

Does the randomatic npm module always create cryptographically secure strings?

I am using this module to generate cryptographically secure verification codes to sign up users on my website. The documentation (https://www.npmjs.com/package/randomatic) says the following about generating cryptographically secure strings:

randomize(pattern, length, options);

randomize.isCrypto;

randomize.isCrypto will be true when a cryptographically secure function is being used to generate random numbers. The value will be false when the function in use is Math.random.

Is there some way for me to ensure that randomize.isCrypto is always true? I am asking because the documentation does not say anything about explictly setting it as true?




Aucun commentaire:

Enregistrer un commentaire