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

randbelow_from_randbits no ValueError, kenral crashing #56

Open
ackaplan11 opened this issue Apr 5, 2021 · 0 comments
Open

randbelow_from_randbits no ValueError, kenral crashing #56

ackaplan11 opened this issue Apr 5, 2021 · 0 comments

Comments

@ackaplan11
Copy link

r = SHA256(1)
r.randbelow_from_randbits(-1)

r = SHA256(1)
r.randbelow_from_randbits(-1)

Both of these function calls cause kernel errors in jupyterhub, and unlike in the docstring for randbelow_from_randbits, no ValueError is raised if n==0.

I suggest assert n > 0 is added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant