Jump to content

some secure random generator anyone?


sangoku

Recommended Posts

There's a few approaches to this. Primarily your goal is to take a unique value and turn it into a unique gibberish string. It depends on the needs of your project, but one approach would be use an incrementing value (increments after a unique code is generated) and then encrypt the value using a reversible encryption such as mcrypt_generic(). The incremented value will never be the same (it will always be greater than any previous value) and thus the encryption will never be the same.

 

The encryption will make it much more difficult to determine what value is being used (and thus, to predict the next value that will be used and it's resulting key).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.