Ephenodrom / Dart-Basic-Utils

A dart package for many helper methods fitting common situations
MIT License
364 stars 77 forks source link

nextInt misuse on CryptoUtils #89

Closed arkare closed 1 year ago

arkare commented 1 year ago

https://github.com/Ephenodrom/Dart-Basic-Utils/blob/8b858e37b6b97bf1ec9f3d603cff9a714b5ca3c6/lib/src/CryptoUtils.dart#L257

Max 8-bit unsigned integer is 255 and nextInt method is exclusive, the correct usage would be:

 seeds.add(random.nextInt(255 + 1)); 
Ephenodrom commented 1 year ago

Looks good, will upload a new release on pub.dev within the next 48 hours. Thank you!