-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add deterministic random functions #181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jackkleeman,
The changes look good to me!
I've one comment about the doc, and about removing the split()
which is somewhat premature imho.
Other than that LGTM!
this.randstate64 = id | ||
} else { | ||
// hash the invocation ID, which is known to contain 74 bits of entropy | ||
const hash = createHash('sha256') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
|
||
const actual: bigint[] = Array.from(Array(50)).map(() => rand.u64()) | ||
|
||
// These values were produced with the reference implementation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really great that you've added these!
|
||
const actual: bigint[] = Array.from(Array(50)).map(() => rand.u64()) | ||
|
||
// These values were produced with the reference implementation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really great that you've added these!
No description provided.