I am making a license key generator and validator which is not intended to really be secure. Currently, I am using Java's random in the client side program to verify the key that is generated, which I hope to do with PHP.
The problem is, I need a random which is identical in Java and PHP, and preferably has implementations in other languages as well. I cannot find any information on this however.
I tried looking up Mersenne Twister implementations, but home there is some better way.
Is there some way to have completely equivalent randoms between these two languages? as in, if it's seeded with "1", both will produce a number like "895547922" on nextInt?
This does not need to be cryptographically secure, it's not being used for any sort of encryption or DRM, but I do want it to be fully predictable with a seed
Aucun commentaire:
Enregistrer un commentaire