vapor / open-crypto

🔑 Hashing (BCrypt, SHA2, HMAC), encryption (AES), public-key (RSA), and random data generation.
MIT License
134 stars 34 forks source link

Make `makeRandom` public #70

Closed rafiki270 closed 5 years ago

rafiki270 commented 6 years ago

Super useful method for me when generating random numbers for RGB colour values. As I haven't found a better way, I would suggest to make this public?

makeRandom(min: 0, max: 256)

potentially it could be called something like randomNumber or randomInt?

calebkleveter commented 6 years ago

Why not use the Swift 4.2 Random APIs? Is that version not available to you yet?

rafiki270 commented 6 years ago

oh ... will have to take look :) I wasn't aware of that change/addition :) @calebkleveter also, not 100 sure I can use 4.2 yet as we'll be going into production rather soon

rafiki270 commented 6 years ago

@tanner0101 should I close it and wait for 4.2 then?