jeudi 5 juillet 2018

Generating an int in a certain range based on a hash

Say you have this hash

0x1ad2b34911a5619e7499237ce0dc61daf16c2ecd2ec4306a6d0aa3e35e66071a

and the only typecast you can do is into uint. How would you generate an int in a certain range, for example from 0-3, based on it?




Aucun commentaire:

Enregistrer un commentaire