Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add randint for generating unsinged integers of every size #22

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

dusnm
Copy link
Contributor

@dusnm dusnm commented Apr 24, 2024

This pull request introduces the randint package.
It's main purpose is to offer utility functions as a shortcut for generating cryptographically secure pseudo-random unsigned integers.

It includes the following functions

  • randint.Uint8
  • randint.Uint16
  • randint.Uint32
  • randint.Uint64

Signed-off-by: Dušan Mitrović <dmitrovic@nanointeractive.com>
@dusnm dusnm added the enhancement New feature or request label Apr 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 51.61290% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 31.11%. Comparing base (181f164) to head (48fb84c).

Files Patch % Lines
randint/randint.go 51.61% 10 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
+ Coverage   30.76%   31.11%   +0.34%     
==========================================
  Files          25       26       +1     
  Lines        1833     1864      +31     
==========================================
+ Hits          564      580      +16     
- Misses       1226     1236      +10     
- Partials       43       48       +5     
Flag Coverage Δ
unit-tests 31.11% <51.61%> (+0.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Dušan Mitrović <dmitrovic@nanointeractive.com>
@dusnm dusnm merged commit 3b8aad8 into master Apr 24, 2024
3 checks passed
@CerealKiller97 CerealKiller97 deleted the feature/randint branch April 24, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants