I recently played with the Random
class and it came to my mind to "reverse" the seed process.
For example: The seed 10000
produces this dataset: 0x32 0xb3 0x84 0xf5 0x30
.
Random random = new Random(10000);
byte[] storage = new byte[5];
random.NextBytes(storage);
My question is, if it is possible to get the seed for a given dataset.
Something like: var seed = GetSeed(new byte[] { 0x32, 0xb3, 0x84, 0xf5, 0x30 }); // returns 10000
I'm pretty sure this isn't possible (somehow like it isn't possible to revert a hash to it's source text) but maybe I'm wrong.
Aucun commentaire:
Enregistrer un commentaire