Generate a number in a specific range from a checksum

纵饮孤独 提交于 2019-12-24 01:53:20

问题


I'm working on a number generator that takes a string as input, and produces a number in a specific range as output. In order to do this, I'll need to determine the minimum and maximum possible value that an md5 checksum can have, and then convert the md5 checksum to a number in that range. How can I convert an md5 checksum to a number in a specified range?

function getNumberInRange(md5checksum, min, max){
    //generate a number between min to max, inclusive, using the md5 checksum that is entered in the input.
    //Every input should have exactly one output.
}

来源:https://stackoverflow.com/questions/15034013/generate-a-number-in-a-specific-range-from-a-checksum

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!